• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016, VIXL authors
2 // All rights reserved.
3 //
4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are met:
6 //
7 //   * Redistributions of source code must retain the above copyright notice,
8 //     this list of conditions and the following disclaimer.
9 //   * Redistributions in binary form must reproduce the above copyright notice,
10 //     this list of conditions and the following disclaimer in the documentation
11 //     and/or other materials provided with the distribution.
12 //   * Neither the name of ARM Limited nor the names of its contributors may be
13 //     used to endorse or promote products derived from this software without
14 //     specific prior written permission.
15 //
16 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
17 // ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
20 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
22 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
23 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 
27 
28 // -----------------------------------------------------------------------------
29 // This file is auto generated from the
30 // test/aarch32/config/template-assembler-aarch32.cc.in template file using
31 // tools/generate_tests.py.
32 //
33 // PLEASE DO NOT EDIT.
34 // -----------------------------------------------------------------------------
35 
36 
37 #include "test-runner.h"
38 
39 #include "test-utils.h"
40 #include "test-utils-aarch32.h"
41 
42 #include "aarch32/assembler-aarch32.h"
43 #include "aarch32/macro-assembler-aarch32.h"
44 
45 #define BUF_SIZE (4096)
46 
47 namespace vixl {
48 namespace aarch32 {
49 
50 // List of instruction mnemonics.
51 #define FOREACH_INSTRUCTION(M) M(add)
52 
53 
54 // The following definitions are defined again in each generated test, therefore
55 // we need to place them in an anomymous namespace. It expresses that they are
56 // local to this file only, and the compiler is not allowed to share these types
57 // across test files during template instantiation. Specifically, `Operands` has
58 // various layouts across generated tests so it absolutely cannot be shared.
59 
60 #ifdef VIXL_INCLUDE_TARGET_T32
61 namespace {
62 
63 // Values to be passed to the assembler to produce the instruction under test.
64 struct Operands {
65   Condition cond;
66   Register rd;
67   Register rn;
68   Register rm;
69 };
70 
71 // This structure contains all data needed to test one specific
72 // instruction.
73 struct TestData {
74   // The `operands` field represents what to pass to the assembler to
75   // produce the instruction.
76   Operands operands;
77   // True if we need to generate an IT instruction for this test to be valid.
78   bool in_it_block;
79   // The condition to give the IT instruction, this will be set to "al" by
80   // default.
81   Condition it_condition;
82   // Description of the operands, used for error reporting.
83   const char* operands_description;
84   // Unique identifier, used for generating traces.
85   const char* identifier;
86 };
87 
88 struct TestResult {
89   size_t size;
90   const byte* encoding;
91 };
92 
93 // Each element of this array produce one instruction encoding.
94 const TestData kTests[] =
95     {{{pl, r13, r13, r1}, true, pl, "pl r13 r13 r1", "pl_r13_r13_r1"},
96      {{mi, r11, r11, r4}, true, mi, "mi r11 r11 r4", "mi_r11_r11_r4"},
97      {{vs, r4, r4, r2}, true, vs, "vs r4 r4 r2", "vs_r4_r4_r2"},
98      {{ls, r7, r7, r6}, true, ls, "ls r7 r7 r6", "ls_r7_r7_r6"},
99      {{le, r4, r4, r2}, true, le, "le r4 r4 r2", "le_r4_r4_r2"},
100      {{vc, r11, r11, r0}, true, vc, "vc r11 r11 r0", "vc_r11_r11_r0"},
101      {{le, r6, r6, r11}, true, le, "le r6 r6 r11", "le_r6_r6_r11"},
102      {{eq, r4, r4, r9}, true, eq, "eq r4 r4 r9", "eq_r4_r4_r9"},
103      {{hi, r12, r12, r2}, true, hi, "hi r12 r12 r2", "hi_r12_r12_r2"},
104      {{hi, r11, r11, r1}, true, hi, "hi r11 r11 r1", "hi_r11_r11_r1"},
105      {{cc, r0, r0, r11}, true, cc, "cc r0 r0 r11", "cc_r0_r0_r11"},
106      {{pl, r2, r2, r2}, true, pl, "pl r2 r2 r2", "pl_r2_r2_r2"},
107      {{ge, r7, r7, r12}, true, ge, "ge r7 r7 r12", "ge_r7_r7_r12"},
108      {{gt, r14, r14, r11}, true, gt, "gt r14 r14 r11", "gt_r14_r14_r11"},
109      {{le, r10, r10, r7}, true, le, "le r10 r10 r7", "le_r10_r10_r7"},
110      {{vs, r7, r7, r7}, true, vs, "vs r7 r7 r7", "vs_r7_r7_r7"},
111      {{lt, r3, r3, r4}, true, lt, "lt r3 r3 r4", "lt_r3_r3_r4"},
112      {{ne, r1, r1, r8}, true, ne, "ne r1 r1 r8", "ne_r1_r1_r8"},
113      {{gt, r7, r7, r12}, true, gt, "gt r7 r7 r12", "gt_r7_r7_r12"},
114      {{ls, r14, r14, r11}, true, ls, "ls r14 r14 r11", "ls_r14_r14_r11"},
115      {{ne, r4, r4, r7}, true, ne, "ne r4 r4 r7", "ne_r4_r4_r7"},
116      {{ge, r12, r12, r2}, true, ge, "ge r12 r12 r2", "ge_r12_r12_r2"},
117      {{ne, r4, r4, r1}, true, ne, "ne r4 r4 r1", "ne_r4_r4_r1"},
118      {{le, r11, r11, r4}, true, le, "le r11 r11 r4", "le_r11_r11_r4"},
119      {{gt, r12, r12, r5}, true, gt, "gt r12 r12 r5", "gt_r12_r12_r5"},
120      {{ge, r14, r14, r4}, true, ge, "ge r14 r14 r4", "ge_r14_r14_r4"},
121      {{hi, r2, r2, r2}, true, hi, "hi r2 r2 r2", "hi_r2_r2_r2"},
122      {{gt, r8, r8, r4}, true, gt, "gt r8 r8 r4", "gt_r8_r8_r4"},
123      {{lt, r13, r13, r14}, true, lt, "lt r13 r13 r14", "lt_r13_r13_r14"},
124      {{cs, r5, r5, r8}, true, cs, "cs r5 r5 r8", "cs_r5_r5_r8"},
125      {{ge, r3, r3, r12}, true, ge, "ge r3 r3 r12", "ge_r3_r3_r12"},
126      {{hi, r0, r0, r8}, true, hi, "hi r0 r0 r8", "hi_r0_r0_r8"},
127      {{vs, r13, r13, r7}, true, vs, "vs r13 r13 r7", "vs_r13_r13_r7"},
128      {{ne, r13, r13, r10}, true, ne, "ne r13 r13 r10", "ne_r13_r13_r10"},
129      {{cc, r0, r0, r6}, true, cc, "cc r0 r0 r6", "cc_r0_r0_r6"},
130      {{gt, r4, r4, r6}, true, gt, "gt r4 r4 r6", "gt_r4_r4_r6"},
131      {{lt, r2, r2, r11}, true, lt, "lt r2 r2 r11", "lt_r2_r2_r11"},
132      {{cc, r12, r12, r0}, true, cc, "cc r12 r12 r0", "cc_r12_r12_r0"},
133      {{vc, r8, r8, r6}, true, vc, "vc r8 r8 r6", "vc_r8_r8_r6"},
134      {{vs, r13, r13, r11}, true, vs, "vs r13 r13 r11", "vs_r13_r13_r11"},
135      {{cc, r1, r1, r2}, true, cc, "cc r1 r1 r2", "cc_r1_r1_r2"},
136      {{hi, r13, r13, r8}, true, hi, "hi r13 r13 r8", "hi_r13_r13_r8"},
137      {{ls, r10, r10, r14}, true, ls, "ls r10 r10 r14", "ls_r10_r10_r14"},
138      {{gt, r5, r5, r2}, true, gt, "gt r5 r5 r2", "gt_r5_r5_r2"},
139      {{ne, r4, r4, r11}, true, ne, "ne r4 r4 r11", "ne_r4_r4_r11"},
140      {{eq, r4, r4, r14}, true, eq, "eq r4 r4 r14", "eq_r4_r4_r14"},
141      {{ls, r13, r13, r11}, true, ls, "ls r13 r13 r11", "ls_r13_r13_r11"},
142      {{cc, r4, r4, r6}, true, cc, "cc r4 r4 r6", "cc_r4_r4_r6"},
143      {{vc, r6, r6, r14}, true, vc, "vc r6 r6 r14", "vc_r6_r6_r14"},
144      {{hi, r9, r9, r6}, true, hi, "hi r9 r9 r6", "hi_r9_r9_r6"},
145      {{ne, r7, r7, r5}, true, ne, "ne r7 r7 r5", "ne_r7_r7_r5"},
146      {{cs, r8, r8, r14}, true, cs, "cs r8 r8 r14", "cs_r8_r8_r14"},
147      {{mi, r5, r5, r3}, true, mi, "mi r5 r5 r3", "mi_r5_r5_r3"},
148      {{vc, r10, r10, r8}, true, vc, "vc r10 r10 r8", "vc_r10_r10_r8"},
149      {{mi, r9, r9, r7}, true, mi, "mi r9 r9 r7", "mi_r9_r9_r7"},
150      {{ls, r4, r4, r5}, true, ls, "ls r4 r4 r5", "ls_r4_r4_r5"},
151      {{vc, r1, r1, r7}, true, vc, "vc r1 r1 r7", "vc_r1_r1_r7"},
152      {{pl, r4, r4, r2}, true, pl, "pl r4 r4 r2", "pl_r4_r4_r2"},
153      {{mi, r2, r2, r12}, true, mi, "mi r2 r2 r12", "mi_r2_r2_r12"},
154      {{gt, r14, r14, r9}, true, gt, "gt r14 r14 r9", "gt_r14_r14_r9"},
155      {{cc, r5, r5, r12}, true, cc, "cc r5 r5 r12", "cc_r5_r5_r12"},
156      {{ne, r5, r5, r7}, true, ne, "ne r5 r5 r7", "ne_r5_r5_r7"},
157      {{pl, r14, r14, r10}, true, pl, "pl r14 r14 r10", "pl_r14_r14_r10"},
158      {{eq, r4, r4, r7}, true, eq, "eq r4 r4 r7", "eq_r4_r4_r7"},
159      {{ls, r7, r7, r9}, true, ls, "ls r7 r7 r9", "ls_r7_r7_r9"},
160      {{vc, r9, r9, r12}, true, vc, "vc r9 r9 r12", "vc_r9_r9_r12"},
161      {{cc, r1, r1, r6}, true, cc, "cc r1 r1 r6", "cc_r1_r1_r6"},
162      {{lt, r14, r14, r9}, true, lt, "lt r14 r14 r9", "lt_r14_r14_r9"},
163      {{mi, r4, r4, r2}, true, mi, "mi r4 r4 r2", "mi_r4_r4_r2"},
164      {{ls, r4, r4, r3}, true, ls, "ls r4 r4 r3", "ls_r4_r4_r3"},
165      {{gt, r0, r0, r10}, true, gt, "gt r0 r0 r10", "gt_r0_r0_r10"},
166      {{vs, r4, r4, r11}, true, vs, "vs r4 r4 r11", "vs_r4_r4_r11"},
167      {{gt, r3, r3, r10}, true, gt, "gt r3 r3 r10", "gt_r3_r3_r10"},
168      {{ne, r2, r2, r4}, true, ne, "ne r2 r2 r4", "ne_r2_r2_r4"},
169      {{ne, r2, r2, r7}, true, ne, "ne r2 r2 r7", "ne_r2_r2_r7"},
170      {{gt, r0, r0, r1}, true, gt, "gt r0 r0 r1", "gt_r0_r0_r1"},
171      {{pl, r8, r8, r10}, true, pl, "pl r8 r8 r10", "pl_r8_r8_r10"},
172      {{pl, r10, r10, r1}, true, pl, "pl r10 r10 r1", "pl_r10_r10_r1"},
173      {{lt, r13, r13, r9}, true, lt, "lt r13 r13 r9", "lt_r13_r13_r9"},
174      {{mi, r10, r10, r8}, true, mi, "mi r10 r10 r8", "mi_r10_r10_r8"},
175      {{le, r6, r6, r4}, true, le, "le r6 r6 r4", "le_r6_r6_r4"},
176      {{le, r0, r0, r0}, true, le, "le r0 r0 r0", "le_r0_r0_r0"},
177      {{vc, r9, r9, r11}, true, vc, "vc r9 r9 r11", "vc_r9_r9_r11"},
178      {{ls, r7, r7, r8}, true, ls, "ls r7 r7 r8", "ls_r7_r7_r8"},
179      {{eq, r9, r9, r3}, true, eq, "eq r9 r9 r3", "eq_r9_r9_r3"},
180      {{gt, r2, r2, r5}, true, gt, "gt r2 r2 r5", "gt_r2_r2_r5"},
181      {{hi, r2, r2, r0}, true, hi, "hi r2 r2 r0", "hi_r2_r2_r0"},
182      {{mi, r3, r3, r3}, true, mi, "mi r3 r3 r3", "mi_r3_r3_r3"},
183      {{cs, r9, r9, r0}, true, cs, "cs r9 r9 r0", "cs_r9_r9_r0"},
184      {{le, r4, r4, r9}, true, le, "le r4 r4 r9", "le_r4_r4_r9"},
185      {{mi, r9, r9, r5}, true, mi, "mi r9 r9 r5", "mi_r9_r9_r5"},
186      {{hi, r14, r14, r0}, true, hi, "hi r14 r14 r0", "hi_r14_r14_r0"},
187      {{le, r8, r8, r10}, true, le, "le r8 r8 r10", "le_r8_r8_r10"},
188      {{lt, r9, r9, r7}, true, lt, "lt r9 r9 r7", "lt_r9_r9_r7"},
189      {{cc, r12, r12, r7}, true, cc, "cc r12 r12 r7", "cc_r12_r12_r7"},
190      {{le, r4, r4, r8}, true, le, "le r4 r4 r8", "le_r4_r4_r8"},
191      {{mi, r3, r3, r6}, true, mi, "mi r3 r3 r6", "mi_r3_r3_r6"},
192      {{mi, r1, r1, r10}, true, mi, "mi r1 r1 r10", "mi_r1_r1_r10"},
193      {{ls, r3, r3, r14}, true, ls, "ls r3 r3 r14", "ls_r3_r3_r14"},
194      {{vs, r8, r8, r5}, true, vs, "vs r8 r8 r5", "vs_r8_r8_r5"},
195      {{cs, r8, r8, r3}, true, cs, "cs r8 r8 r3", "cs_r8_r8_r3"},
196      {{le, r3, r3, r9}, true, le, "le r3 r3 r9", "le_r3_r3_r9"},
197      {{eq, r10, r10, r5}, true, eq, "eq r10 r10 r5", "eq_r10_r10_r5"},
198      {{le, r7, r7, r0}, true, le, "le r7 r7 r0", "le_r7_r7_r0"},
199      {{vc, r12, r12, r10}, true, vc, "vc r12 r12 r10", "vc_r12_r12_r10"},
200      {{cc, r6, r6, r3}, true, cc, "cc r6 r6 r3", "cc_r6_r6_r3"},
201      {{mi, r4, r4, r8}, true, mi, "mi r4 r4 r8", "mi_r4_r4_r8"},
202      {{pl, r5, r5, r1}, true, pl, "pl r5 r5 r1", "pl_r5_r5_r1"},
203      {{ge, r5, r5, r6}, true, ge, "ge r5 r5 r6", "ge_r5_r5_r6"},
204      {{le, r3, r3, r10}, true, le, "le r3 r3 r10", "le_r3_r3_r10"},
205      {{lt, r1, r1, r5}, true, lt, "lt r1 r1 r5", "lt_r1_r1_r5"},
206      {{ls, r9, r9, r10}, true, ls, "ls r9 r9 r10", "ls_r9_r9_r10"},
207      {{vc, r13, r13, r2}, true, vc, "vc r13 r13 r2", "vc_r13_r13_r2"},
208      {{ne, r2, r2, r1}, true, ne, "ne r2 r2 r1", "ne_r2_r2_r1"},
209      {{vs, r9, r9, r0}, true, vs, "vs r9 r9 r0", "vs_r9_r9_r0"},
210      {{cc, r6, r6, r14}, true, cc, "cc r6 r6 r14", "cc_r6_r6_r14"},
211      {{cc, r12, r12, r11}, true, cc, "cc r12 r12 r11", "cc_r12_r12_r11"},
212      {{pl, r1, r1, r8}, true, pl, "pl r1 r1 r8", "pl_r1_r1_r8"},
213      {{eq, r13, r13, r14}, true, eq, "eq r13 r13 r14", "eq_r13_r13_r14"},
214      {{eq, r1, r1, r0}, true, eq, "eq r1 r1 r0", "eq_r1_r1_r0"},
215      {{ge, r11, r11, r2}, true, ge, "ge r11 r11 r2", "ge_r11_r11_r2"},
216      {{pl, r2, r2, r14}, true, pl, "pl r2 r2 r14", "pl_r2_r2_r14"},
217      {{mi, r5, r5, r14}, true, mi, "mi r5 r5 r14", "mi_r5_r5_r14"},
218      {{eq, r6, r6, r9}, true, eq, "eq r6 r6 r9", "eq_r6_r6_r9"},
219      {{mi, r4, r4, r3}, true, mi, "mi r4 r4 r3", "mi_r4_r4_r3"},
220      {{hi, r13, r13, r2}, true, hi, "hi r13 r13 r2", "hi_r13_r13_r2"},
221      {{pl, r3, r3, r0}, true, pl, "pl r3 r3 r0", "pl_r3_r3_r0"},
222      {{eq, r12, r12, r1}, true, eq, "eq r12 r12 r1", "eq_r12_r12_r1"},
223      {{cs, r4, r4, r14}, true, cs, "cs r4 r4 r14", "cs_r4_r4_r14"},
224      {{hi, r1, r1, r5}, true, hi, "hi r1 r1 r5", "hi_r1_r1_r5"},
225      {{cc, r5, r5, r7}, true, cc, "cc r5 r5 r7", "cc_r5_r5_r7"},
226      {{cs, r13, r13, r6}, true, cs, "cs r13 r13 r6", "cs_r13_r13_r6"},
227      {{mi, r4, r4, r5}, true, mi, "mi r4 r4 r5", "mi_r4_r4_r5"},
228      {{lt, r11, r11, r11}, true, lt, "lt r11 r11 r11", "lt_r11_r11_r11"},
229      {{cs, r12, r12, r8}, true, cs, "cs r12 r12 r8", "cs_r12_r12_r8"},
230      {{hi, r8, r8, r5}, true, hi, "hi r8 r8 r5", "hi_r8_r8_r5"},
231      {{vs, r5, r5, r14}, true, vs, "vs r5 r5 r14", "vs_r5_r5_r14"},
232      {{pl, r9, r9, r9}, true, pl, "pl r9 r9 r9", "pl_r9_r9_r9"},
233      {{mi, r6, r6, r11}, true, mi, "mi r6 r6 r11", "mi_r6_r6_r11"},
234      {{ne, r12, r12, r10}, true, ne, "ne r12 r12 r10", "ne_r12_r12_r10"},
235      {{gt, r3, r3, r6}, true, gt, "gt r3 r3 r6", "gt_r3_r3_r6"},
236      {{gt, r6, r6, r4}, true, gt, "gt r6 r6 r4", "gt_r6_r6_r4"},
237      {{le, r6, r6, r3}, true, le, "le r6 r6 r3", "le_r6_r6_r3"},
238      {{ne, r6, r6, r12}, true, ne, "ne r6 r6 r12", "ne_r6_r6_r12"},
239      {{cc, r6, r6, r12}, true, cc, "cc r6 r6 r12", "cc_r6_r6_r12"},
240      {{ne, r10, r10, r4}, true, ne, "ne r10 r10 r4", "ne_r10_r10_r4"},
241      {{eq, r0, r0, r12}, true, eq, "eq r0 r0 r12", "eq_r0_r0_r12"},
242      {{ge, r4, r4, r9}, true, ge, "ge r4 r4 r9", "ge_r4_r4_r9"},
243      {{gt, r6, r6, r9}, true, gt, "gt r6 r6 r9", "gt_r6_r6_r9"},
244      {{le, r14, r14, r9}, true, le, "le r14 r14 r9", "le_r14_r14_r9"},
245      {{pl, r9, r9, r3}, true, pl, "pl r9 r9 r3", "pl_r9_r9_r3"},
246      {{lt, r4, r4, r8}, true, lt, "lt r4 r4 r8", "lt_r4_r4_r8"},
247      {{cc, r7, r7, r12}, true, cc, "cc r7 r7 r12", "cc_r7_r7_r12"},
248      {{vs, r9, r9, r12}, true, vs, "vs r9 r9 r12", "vs_r9_r9_r12"},
249      {{pl, r5, r5, r14}, true, pl, "pl r5 r5 r14", "pl_r5_r5_r14"},
250      {{le, r1, r1, r10}, true, le, "le r1 r1 r10", "le_r1_r1_r10"},
251      {{lt, r3, r3, r10}, true, lt, "lt r3 r3 r10", "lt_r3_r3_r10"},
252      {{cc, r4, r4, r1}, true, cc, "cc r4 r4 r1", "cc_r4_r4_r1"},
253      {{ne, r4, r4, r14}, true, ne, "ne r4 r4 r14", "ne_r4_r4_r14"},
254      {{vc, r14, r14, r2}, true, vc, "vc r14 r14 r2", "vc_r14_r14_r2"},
255      {{pl, r3, r3, r11}, true, pl, "pl r3 r3 r11", "pl_r3_r3_r11"},
256      {{pl, r12, r12, r5}, true, pl, "pl r12 r12 r5", "pl_r12_r12_r5"},
257      {{hi, r10, r10, r6}, true, hi, "hi r10 r10 r6", "hi_r10_r10_r6"},
258      {{gt, r3, r3, r4}, true, gt, "gt r3 r3 r4", "gt_r3_r3_r4"},
259      {{gt, r13, r13, r5}, true, gt, "gt r13 r13 r5", "gt_r13_r13_r5"},
260      {{ne, r12, r12, r6}, true, ne, "ne r12 r12 r6", "ne_r12_r12_r6"},
261      {{eq, r6, r6, r5}, true, eq, "eq r6 r6 r5", "eq_r6_r6_r5"},
262      {{vs, r6, r6, r12}, true, vs, "vs r6 r6 r12", "vs_r6_r6_r12"},
263      {{lt, r14, r14, r8}, true, lt, "lt r14 r14 r8", "lt_r14_r14_r8"},
264      {{ls, r10, r10, r4}, true, ls, "ls r10 r10 r4", "ls_r10_r10_r4"},
265      {{cc, r12, r12, r3}, true, cc, "cc r12 r12 r3", "cc_r12_r12_r3"},
266      {{ne, r13, r13, r11}, true, ne, "ne r13 r13 r11", "ne_r13_r13_r11"},
267      {{lt, r4, r4, r0}, true, lt, "lt r4 r4 r0", "lt_r4_r4_r0"},
268      {{mi, r14, r14, r2}, true, mi, "mi r14 r14 r2", "mi_r14_r14_r2"},
269      {{ls, r11, r11, r1}, true, ls, "ls r11 r11 r1", "ls_r11_r11_r1"},
270      {{hi, r1, r1, r11}, true, hi, "hi r1 r1 r11", "hi_r1_r1_r11"},
271      {{ge, r14, r14, r12}, true, ge, "ge r14 r14 r12", "ge_r14_r14_r12"},
272      {{cs, r4, r4, r3}, true, cs, "cs r4 r4 r3", "cs_r4_r4_r3"},
273      {{hi, r5, r5, r3}, true, hi, "hi r5 r5 r3", "hi_r5_r5_r3"},
274      {{vs, r13, r13, r4}, true, vs, "vs r13 r13 r4", "vs_r13_r13_r4"},
275      {{le, r13, r13, r5}, true, le, "le r13 r13 r5", "le_r13_r13_r5"},
276      {{vs, r11, r11, r9}, true, vs, "vs r11 r11 r9", "vs_r11_r11_r9"},
277      {{lt, r8, r8, r6}, true, lt, "lt r8 r8 r6", "lt_r8_r8_r6"},
278      {{gt, r7, r7, r0}, true, gt, "gt r7 r7 r0", "gt_r7_r7_r0"},
279      {{eq, r8, r8, r1}, true, eq, "eq r8 r8 r1", "eq_r8_r8_r1"},
280      {{hi, r3, r3, r2}, true, hi, "hi r3 r3 r2", "hi_r3_r3_r2"},
281      {{pl, r4, r4, r1}, true, pl, "pl r4 r4 r1", "pl_r4_r4_r1"},
282      {{pl, r8, r8, r14}, true, pl, "pl r8 r8 r14", "pl_r8_r8_r14"},
283      {{lt, r8, r8, r7}, true, lt, "lt r8 r8 r7", "lt_r8_r8_r7"},
284      {{lt, r3, r3, r11}, true, lt, "lt r3 r3 r11", "lt_r3_r3_r11"},
285      {{ne, r5, r5, r2}, true, ne, "ne r5 r5 r2", "ne_r5_r5_r2"},
286      {{mi, r10, r10, r6}, true, mi, "mi r10 r10 r6", "mi_r10_r10_r6"},
287      {{vs, r3, r3, r5}, true, vs, "vs r3 r3 r5", "vs_r3_r3_r5"},
288      {{cs, r5, r5, r1}, true, cs, "cs r5 r5 r1", "cs_r5_r5_r1"},
289      {{ne, r0, r0, r0}, true, ne, "ne r0 r0 r0", "ne_r0_r0_r0"},
290      {{mi, r11, r11, r12}, true, mi, "mi r11 r11 r12", "mi_r11_r11_r12"},
291      {{ne, r7, r7, r14}, true, ne, "ne r7 r7 r14", "ne_r7_r7_r14"},
292      {{eq, r14, r14, r2}, true, eq, "eq r14 r14 r2", "eq_r14_r14_r2"},
293      {{ne, r1, r1, r0}, true, ne, "ne r1 r1 r0", "ne_r1_r1_r0"},
294      {{hi, r5, r5, r14}, true, hi, "hi r5 r5 r14", "hi_r5_r5_r14"},
295      {{lt, r7, r7, r11}, true, lt, "lt r7 r7 r11", "lt_r7_r7_r11"},
296      {{gt, r10, r10, r12}, true, gt, "gt r10 r10 r12", "gt_r10_r10_r12"},
297      {{lt, r9, r9, r6}, true, lt, "lt r9 r9 r6", "lt_r9_r9_r6"},
298      {{pl, r7, r7, r14}, true, pl, "pl r7 r7 r14", "pl_r7_r7_r14"},
299      {{eq, r8, r8, r3}, true, eq, "eq r8 r8 r3", "eq_r8_r8_r3"},
300      {{cc, r2, r2, r1}, true, cc, "cc r2 r2 r1", "cc_r2_r2_r1"},
301      {{mi, r2, r2, r1}, true, mi, "mi r2 r2 r1", "mi_r2_r2_r1"},
302      {{vc, r13, r13, r6}, true, vc, "vc r13 r13 r6", "vc_r13_r13_r6"},
303      {{vc, r14, r14, r9}, true, vc, "vc r14 r14 r9", "vc_r14_r14_r9"},
304      {{ne, r6, r6, r0}, true, ne, "ne r6 r6 r0", "ne_r6_r6_r0"},
305      {{ne, r8, r8, r9}, true, ne, "ne r8 r8 r9", "ne_r8_r8_r9"},
306      {{mi, r6, r6, r4}, true, mi, "mi r6 r6 r4", "mi_r6_r6_r4"},
307      {{vc, r4, r4, r11}, true, vc, "vc r4 r4 r11", "vc_r4_r4_r11"},
308      {{lt, r3, r3, r1}, true, lt, "lt r3 r3 r1", "lt_r3_r3_r1"},
309      {{pl, r5, r5, r11}, true, pl, "pl r5 r5 r11", "pl_r5_r5_r11"},
310      {{mi, r5, r5, r11}, true, mi, "mi r5 r5 r11", "mi_r5_r5_r11"},
311      {{hi, r1, r1, r7}, true, hi, "hi r1 r1 r7", "hi_r1_r1_r7"},
312      {{hi, r7, r7, r9}, true, hi, "hi r7 r7 r9", "hi_r7_r7_r9"},
313      {{vs, r11, r11, r1}, true, vs, "vs r11 r11 r1", "vs_r11_r11_r1"},
314      {{cc, r13, r13, r4}, true, cc, "cc r13 r13 r4", "cc_r13_r13_r4"},
315      {{mi, r6, r6, r0}, true, mi, "mi r6 r6 r0", "mi_r6_r6_r0"},
316      {{mi, r2, r2, r6}, true, mi, "mi r2 r2 r6", "mi_r2_r2_r6"},
317      {{eq, r9, r9, r14}, true, eq, "eq r9 r9 r14", "eq_r9_r9_r14"},
318      {{eq, r5, r5, r12}, true, eq, "eq r5 r5 r12", "eq_r5_r5_r12"},
319      {{cs, r13, r13, r14}, true, cs, "cs r13 r13 r14", "cs_r13_r13_r14"},
320      {{eq, r3, r3, r12}, true, eq, "eq r3 r3 r12", "eq_r3_r3_r12"},
321      {{cc, r13, r13, r10}, true, cc, "cc r13 r13 r10", "cc_r13_r13_r10"},
322      {{eq, r11, r11, r11}, true, eq, "eq r11 r11 r11", "eq_r11_r11_r11"},
323      {{vs, r12, r12, r10}, true, vs, "vs r12 r12 r10", "vs_r12_r12_r10"},
324      {{vc, r10, r10, r6}, true, vc, "vc r10 r10 r6", "vc_r10_r10_r6"},
325      {{le, r13, r13, r14}, true, le, "le r13 r13 r14", "le_r13_r13_r14"},
326      {{eq, r2, r2, r10}, true, eq, "eq r2 r2 r10", "eq_r2_r2_r10"},
327      {{lt, r8, r8, r11}, true, lt, "lt r8 r8 r11", "lt_r8_r8_r11"},
328      {{vs, r0, r0, r10}, true, vs, "vs r0 r0 r10", "vs_r0_r0_r10"},
329      {{hi, r10, r10, r14}, true, hi, "hi r10 r10 r14", "hi_r10_r10_r14"},
330      {{mi, r4, r4, r1}, true, mi, "mi r4 r4 r1", "mi_r4_r4_r1"},
331      {{ls, r12, r12, r8}, true, ls, "ls r12 r12 r8", "ls_r12_r12_r8"},
332      {{mi, r7, r7, r14}, true, mi, "mi r7 r7 r14", "mi_r7_r7_r14"},
333      {{ge, r6, r6, r11}, true, ge, "ge r6 r6 r11", "ge_r6_r6_r11"},
334      {{vs, r11, r11, r0}, true, vs, "vs r11 r11 r0", "vs_r11_r11_r0"},
335      {{vs, r11, r11, r12}, true, vs, "vs r11 r11 r12", "vs_r11_r11_r12"},
336      {{vs, r2, r2, r12}, true, vs, "vs r2 r2 r12", "vs_r2_r2_r12"},
337      {{ne, r7, r7, r7}, true, ne, "ne r7 r7 r7", "ne_r7_r7_r7"},
338      {{vs, r12, r12, r6}, true, vs, "vs r12 r12 r6", "vs_r12_r12_r6"},
339      {{cs, r11, r11, r14}, true, cs, "cs r11 r11 r14", "cs_r11_r11_r14"},
340      {{pl, r3, r3, r12}, true, pl, "pl r3 r3 r12", "pl_r3_r3_r12"},
341      {{eq, r11, r11, r9}, true, eq, "eq r11 r11 r9", "eq_r11_r11_r9"},
342      {{ge, r13, r13, r4}, true, ge, "ge r13 r13 r4", "ge_r13_r13_r4"},
343      {{eq, r14, r14, r5}, true, eq, "eq r14 r14 r5", "eq_r14_r14_r5"},
344      {{lt, r5, r5, r14}, true, lt, "lt r5 r5 r14", "lt_r5_r5_r14"},
345      {{ne, r2, r2, r6}, true, ne, "ne r2 r2 r6", "ne_r2_r2_r6"},
346      {{gt, r1, r1, r14}, true, gt, "gt r1 r1 r14", "gt_r1_r1_r14"},
347      {{ne, r14, r14, r0}, true, ne, "ne r14 r14 r0", "ne_r14_r14_r0"},
348      {{le, r1, r1, r7}, true, le, "le r1 r1 r7", "le_r1_r1_r7"},
349      {{vs, r7, r7, r3}, true, vs, "vs r7 r7 r3", "vs_r7_r7_r3"},
350      {{le, r6, r6, r1}, true, le, "le r6 r6 r1", "le_r6_r6_r1"},
351      {{lt, r6, r6, r9}, true, lt, "lt r6 r6 r9", "lt_r6_r6_r9"},
352      {{cs, r7, r7, r12}, true, cs, "cs r7 r7 r12", "cs_r7_r7_r12"},
353      {{pl, r14, r14, r7}, true, pl, "pl r14 r14 r7", "pl_r14_r14_r7"},
354      {{gt, r13, r13, r0}, true, gt, "gt r13 r13 r0", "gt_r13_r13_r0"},
355      {{cc, r7, r7, r8}, true, cc, "cc r7 r7 r8", "cc_r7_r7_r8"},
356      {{vs, r6, r6, r10}, true, vs, "vs r6 r6 r10", "vs_r6_r6_r10"},
357      {{eq, r11, r11, r2}, true, eq, "eq r11 r11 r2", "eq_r11_r11_r2"},
358      {{vs, r1, r1, r0}, true, vs, "vs r1 r1 r0", "vs_r1_r1_r0"},
359      {{gt, r11, r11, r3}, true, gt, "gt r11 r11 r3", "gt_r11_r11_r3"},
360      {{lt, r2, r2, r6}, true, lt, "lt r2 r2 r6", "lt_r2_r2_r6"},
361      {{ls, r7, r7, r4}, true, ls, "ls r7 r7 r4", "ls_r7_r7_r4"},
362      {{vs, r12, r12, r7}, true, vs, "vs r12 r12 r7", "vs_r12_r12_r7"},
363      {{eq, r10, r10, r8}, true, eq, "eq r10 r10 r8", "eq_r10_r10_r8"},
364      {{gt, r12, r12, r1}, true, gt, "gt r12 r12 r1", "gt_r12_r12_r1"},
365      {{ne, r6, r6, r1}, true, ne, "ne r6 r6 r1", "ne_r6_r6_r1"},
366      {{gt, r5, r5, r3}, true, gt, "gt r5 r5 r3", "gt_r5_r5_r3"},
367      {{vc, r4, r4, r8}, true, vc, "vc r4 r4 r8", "vc_r4_r4_r8"},
368      {{mi, r14, r14, r9}, true, mi, "mi r14 r14 r9", "mi_r14_r14_r9"},
369      {{le, r7, r7, r4}, true, le, "le r7 r7 r4", "le_r7_r7_r4"},
370      {{ge, r6, r6, r5}, true, ge, "ge r6 r6 r5", "ge_r6_r6_r5"},
371      {{ne, r10, r10, r14}, true, ne, "ne r10 r10 r14", "ne_r10_r10_r14"},
372      {{lt, r5, r5, r0}, true, lt, "lt r5 r5 r0", "lt_r5_r5_r0"},
373      {{mi, r9, r9, r14}, true, mi, "mi r9 r9 r14", "mi_r9_r9_r14"},
374      {{ls, r8, r8, r2}, true, ls, "ls r8 r8 r2", "ls_r8_r8_r2"},
375      {{gt, r9, r9, r9}, true, gt, "gt r9 r9 r9", "gt_r9_r9_r9"},
376      {{hi, r0, r0, r10}, true, hi, "hi r0 r0 r10", "hi_r0_r0_r10"},
377      {{lt, r7, r7, r8}, true, lt, "lt r7 r7 r8", "lt_r7_r7_r8"},
378      {{eq, r6, r6, r4}, true, eq, "eq r6 r6 r4", "eq_r6_r6_r4"},
379      {{cc, r5, r5, r2}, true, cc, "cc r5 r5 r2", "cc_r5_r5_r2"},
380      {{le, r9, r9, r9}, true, le, "le r9 r9 r9", "le_r9_r9_r9"},
381      {{gt, r11, r11, r8}, true, gt, "gt r11 r11 r8", "gt_r11_r11_r8"},
382      {{le, r3, r3, r2}, true, le, "le r3 r3 r2", "le_r3_r3_r2"},
383      {{ge, r0, r0, r0}, true, ge, "ge r0 r0 r0", "ge_r0_r0_r0"},
384      {{ne, r10, r10, r9}, true, ne, "ne r10 r10 r9", "ne_r10_r10_r9"},
385      {{vs, r5, r5, r2}, true, vs, "vs r5 r5 r2", "vs_r5_r5_r2"},
386      {{vc, r1, r1, r4}, true, vc, "vc r1 r1 r4", "vc_r1_r1_r4"},
387      {{vc, r8, r8, r4}, true, vc, "vc r8 r8 r4", "vc_r8_r8_r4"},
388      {{ls, r12, r12, r4}, true, ls, "ls r12 r12 r4", "ls_r12_r12_r4"},
389      {{lt, r10, r10, r11}, true, lt, "lt r10 r10 r11", "lt_r10_r10_r11"},
390      {{ge, r14, r14, r0}, true, ge, "ge r14 r14 r0", "ge_r14_r14_r0"},
391      {{vs, r6, r6, r9}, true, vs, "vs r6 r6 r9", "vs_r6_r6_r9"},
392      {{hi, r2, r2, r4}, true, hi, "hi r2 r2 r4", "hi_r2_r2_r4"},
393      {{lt, r0, r0, r5}, true, lt, "lt r0 r0 r5", "lt_r0_r0_r5"},
394      {{ge, r9, r9, r5}, true, ge, "ge r9 r9 r5", "ge_r9_r9_r5"},
395      {{mi, r13, r13, r11}, true, mi, "mi r13 r13 r11", "mi_r13_r13_r11"},
396      {{vc, r8, r8, r2}, true, vc, "vc r8 r8 r2", "vc_r8_r8_r2"},
397      {{cc, r12, r12, r1}, true, cc, "cc r12 r12 r1", "cc_r12_r12_r1"},
398      {{ne, r8, r8, r6}, true, ne, "ne r8 r8 r6", "ne_r8_r8_r6"},
399      {{vs, r12, r12, r9}, true, vs, "vs r12 r12 r9", "vs_r12_r12_r9"},
400      {{ge, r8, r8, r12}, true, ge, "ge r8 r8 r12", "ge_r8_r8_r12"},
401      {{ls, r6, r6, r12}, true, ls, "ls r6 r6 r12", "ls_r6_r6_r12"},
402      {{vc, r11, r11, r2}, true, vc, "vc r11 r11 r2", "vc_r11_r11_r2"},
403      {{le, r8, r8, r6}, true, le, "le r8 r8 r6", "le_r8_r8_r6"},
404      {{ge, r7, r7, r6}, true, ge, "ge r7 r7 r6", "ge_r7_r7_r6"},
405      {{pl, r11, r11, r12}, true, pl, "pl r11 r11 r12", "pl_r11_r11_r12"},
406      {{ls, r12, r12, r7}, true, ls, "ls r12 r12 r7", "ls_r12_r12_r7"},
407      {{ne, r14, r14, r10}, true, ne, "ne r14 r14 r10", "ne_r14_r14_r10"},
408      {{gt, r2, r2, r9}, true, gt, "gt r2 r2 r9", "gt_r2_r2_r9"},
409      {{ne, r3, r3, r11}, true, ne, "ne r3 r3 r11", "ne_r3_r3_r11"},
410      {{mi, r3, r3, r11}, true, mi, "mi r3 r3 r11", "mi_r3_r3_r11"},
411      {{ne, r8, r8, r2}, true, ne, "ne r8 r8 r2", "ne_r8_r8_r2"},
412      {{le, r12, r12, r8}, true, le, "le r12 r12 r8", "le_r12_r12_r8"},
413      {{hi, r0, r0, r14}, true, hi, "hi r0 r0 r14", "hi_r0_r0_r14"},
414      {{le, r0, r0, r12}, true, le, "le r0 r0 r12", "le_r0_r0_r12"},
415      {{ge, r7, r7, r0}, true, ge, "ge r7 r7 r0", "ge_r7_r7_r0"},
416      {{gt, r9, r9, r11}, true, gt, "gt r9 r9 r11", "gt_r9_r9_r11"},
417      {{ge, r0, r0, r14}, true, ge, "ge r0 r0 r14", "ge_r0_r0_r14"},
418      {{cc, r9, r9, r2}, true, cc, "cc r9 r9 r2", "cc_r9_r9_r2"},
419      {{gt, r1, r1, r9}, true, gt, "gt r1 r1 r9", "gt_r1_r1_r9"},
420      {{vs, r7, r7, r9}, true, vs, "vs r7 r7 r9", "vs_r7_r7_r9"},
421      {{ls, r2, r2, r11}, true, ls, "ls r2 r2 r11", "ls_r2_r2_r11"},
422      {{cs, r14, r14, r2}, true, cs, "cs r14 r14 r2", "cs_r14_r14_r2"},
423      {{vc, r6, r6, r6}, true, vc, "vc r6 r6 r6", "vc_r6_r6_r6"},
424      {{gt, r5, r5, r11}, true, gt, "gt r5 r5 r11", "gt_r5_r5_r11"},
425      {{ge, r12, r12, r0}, true, ge, "ge r12 r12 r0", "ge_r12_r12_r0"},
426      {{lt, r1, r1, r1}, true, lt, "lt r1 r1 r1", "lt_r1_r1_r1"},
427      {{cc, r8, r8, r10}, true, cc, "cc r8 r8 r10", "cc_r8_r8_r10"},
428      {{cs, r12, r12, r11}, true, cs, "cs r12 r12 r11", "cs_r12_r12_r11"},
429      {{mi, r3, r3, r4}, true, mi, "mi r3 r3 r4", "mi_r3_r3_r4"},
430      {{cs, r14, r14, r1}, true, cs, "cs r14 r14 r1", "cs_r14_r14_r1"},
431      {{ne, r2, r2, r5}, true, ne, "ne r2 r2 r5", "ne_r2_r2_r5"},
432      {{cc, r7, r7, r2}, true, cc, "cc r7 r7 r2", "cc_r7_r7_r2"},
433      {{cc, r11, r11, r2}, true, cc, "cc r11 r11 r2", "cc_r11_r11_r2"},
434      {{hi, r10, r10, r12}, true, hi, "hi r10 r10 r12", "hi_r10_r10_r12"},
435      {{ls, r12, r12, r6}, true, ls, "ls r12 r12 r6", "ls_r12_r12_r6"},
436      {{le, r0, r0, r5}, true, le, "le r0 r0 r5", "le_r0_r0_r5"},
437      {{ne, r9, r9, r3}, true, ne, "ne r9 r9 r3", "ne_r9_r9_r3"},
438      {{le, r12, r12, r6}, true, le, "le r12 r12 r6", "le_r12_r12_r6"},
439      {{cc, r8, r8, r12}, true, cc, "cc r8 r8 r12", "cc_r8_r8_r12"},
440      {{lt, r10, r10, r2}, true, lt, "lt r10 r10 r2", "lt_r10_r10_r2"},
441      {{eq, r9, r9, r11}, true, eq, "eq r9 r9 r11", "eq_r9_r9_r11"},
442      {{cc, r10, r10, r5}, true, cc, "cc r10 r10 r5", "cc_r10_r10_r5"},
443      {{vs, r10, r10, r11}, true, vs, "vs r10 r10 r11", "vs_r10_r10_r11"},
444      {{ne, r6, r6, r14}, true, ne, "ne r6 r6 r14", "ne_r6_r6_r14"},
445      {{ne, r2, r2, r0}, true, ne, "ne r2 r2 r0", "ne_r2_r2_r0"},
446      {{ge, r11, r11, r14}, true, ge, "ge r11 r11 r14", "ge_r11_r11_r14"},
447      {{cc, r4, r4, r14}, true, cc, "cc r4 r4 r14", "cc_r4_r4_r14"},
448      {{eq, r7, r7, r8}, true, eq, "eq r7 r7 r8", "eq_r7_r7_r8"},
449      {{vc, r14, r14, r6}, true, vc, "vc r14 r14 r6", "vc_r14_r14_r6"},
450      {{cc, r12, r12, r12}, true, cc, "cc r12 r12 r12", "cc_r12_r12_r12"},
451      {{eq, r4, r4, r4}, true, eq, "eq r4 r4 r4", "eq_r4_r4_r4"},
452      {{vc, r9, r9, r2}, true, vc, "vc r9 r9 r2", "vc_r9_r9_r2"},
453      {{mi, r13, r13, r2}, true, mi, "mi r13 r13 r2", "mi_r13_r13_r2"},
454      {{vc, r9, r9, r10}, true, vc, "vc r9 r9 r10", "vc_r9_r9_r10"},
455      {{vc, r4, r4, r0}, true, vc, "vc r4 r4 r0", "vc_r4_r4_r0"},
456      {{ge, r2, r2, r5}, true, ge, "ge r2 r2 r5", "ge_r2_r2_r5"},
457      {{mi, r10, r10, r7}, true, mi, "mi r10 r10 r7", "mi_r10_r10_r7"},
458      {{le, r5, r5, r12}, true, le, "le r5 r5 r12", "le_r5_r5_r12"},
459      {{ge, r2, r2, r9}, true, ge, "ge r2 r2 r9", "ge_r2_r2_r9"},
460      {{eq, r7, r7, r14}, true, eq, "eq r7 r7 r14", "eq_r7_r7_r14"},
461      {{cc, r7, r7, r7}, true, cc, "cc r7 r7 r7", "cc_r7_r7_r7"},
462      {{vc, r4, r4, r9}, true, vc, "vc r4 r4 r9", "vc_r4_r4_r9"},
463      {{mi, r13, r13, r5}, true, mi, "mi r13 r13 r5", "mi_r13_r13_r5"},
464      {{eq, r14, r14, r1}, true, eq, "eq r14 r14 r1", "eq_r14_r14_r1"},
465      {{vs, r8, r8, r8}, true, vs, "vs r8 r8 r8", "vs_r8_r8_r8"},
466      {{eq, r7, r7, r12}, true, eq, "eq r7 r7 r12", "eq_r7_r7_r12"},
467      {{cc, r13, r13, r3}, true, cc, "cc r13 r13 r3", "cc_r13_r13_r3"},
468      {{ge, r1, r1, r12}, true, ge, "ge r1 r1 r12", "ge_r1_r1_r12"},
469      {{ls, r10, r10, r10}, true, ls, "ls r10 r10 r10", "ls_r10_r10_r10"},
470      {{le, r3, r3, r1}, true, le, "le r3 r3 r1", "le_r3_r3_r1"},
471      {{vc, r13, r13, r3}, true, vc, "vc r13 r13 r3", "vc_r13_r13_r3"},
472      {{le, r13, r13, r6}, true, le, "le r13 r13 r6", "le_r13_r13_r6"},
473      {{le, r4, r4, r0}, true, le, "le r4 r4 r0", "le_r4_r4_r0"},
474      {{cs, r2, r2, r11}, true, cs, "cs r2 r2 r11", "cs_r2_r2_r11"},
475      {{vs, r13, r13, r0}, true, vs, "vs r13 r13 r0", "vs_r13_r13_r0"},
476      {{gt, r6, r6, r12}, true, gt, "gt r6 r6 r12", "gt_r6_r6_r12"},
477      {{cs, r14, r14, r0}, true, cs, "cs r14 r14 r0", "cs_r14_r14_r0"},
478      {{ne, r11, r11, r3}, true, ne, "ne r11 r11 r3", "ne_r11_r11_r3"},
479      {{ls, r3, r3, r3}, true, ls, "ls r3 r3 r3", "ls_r3_r3_r3"},
480      {{ne, r12, r12, r8}, true, ne, "ne r12 r12 r8", "ne_r12_r12_r8"},
481      {{ge, r1, r1, r8}, true, ge, "ge r1 r1 r8", "ge_r1_r1_r8"},
482      {{ls, r2, r2, r2}, true, ls, "ls r2 r2 r2", "ls_r2_r2_r2"},
483      {{ls, r14, r14, r6}, true, ls, "ls r14 r14 r6", "ls_r14_r14_r6"},
484      {{ls, r1, r1, r12}, true, ls, "ls r1 r1 r12", "ls_r1_r1_r12"},
485      {{ge, r11, r11, r0}, true, ge, "ge r11 r11 r0", "ge_r11_r11_r0"},
486      {{le, r7, r7, r1}, true, le, "le r7 r7 r1", "le_r7_r7_r1"},
487      {{mi, r0, r0, r2}, true, mi, "mi r0 r0 r2", "mi_r0_r0_r2"},
488      {{cc, r1, r1, r10}, true, cc, "cc r1 r1 r10", "cc_r1_r1_r10"},
489      {{hi, r6, r6, r7}, true, hi, "hi r6 r6 r7", "hi_r6_r6_r7"},
490      {{vc, r0, r0, r8}, true, vc, "vc r0 r0 r8", "vc_r0_r0_r8"},
491      {{hi, r1, r1, r6}, true, hi, "hi r1 r1 r6", "hi_r1_r1_r6"},
492      {{pl, r2, r2, r10}, true, pl, "pl r2 r2 r10", "pl_r2_r2_r10"},
493      {{vc, r14, r14, r0}, true, vc, "vc r14 r14 r0", "vc_r14_r14_r0"},
494      {{hi, r13, r13, r1}, true, hi, "hi r13 r13 r1", "hi_r13_r13_r1"},
495      {{le, r14, r14, r8}, true, le, "le r14 r14 r8", "le_r14_r14_r8"},
496      {{ne, r2, r2, r2}, true, ne, "ne r2 r2 r2", "ne_r2_r2_r2"},
497      {{pl, r4, r4, r0}, true, pl, "pl r4 r4 r0", "pl_r4_r4_r0"},
498      {{gt, r10, r10, r10}, true, gt, "gt r10 r10 r10", "gt_r10_r10_r10"},
499      {{eq, r9, r9, r6}, true, eq, "eq r9 r9 r6", "eq_r9_r9_r6"},
500      {{eq, r9, r9, r10}, true, eq, "eq r9 r9 r10", "eq_r9_r9_r10"},
501      {{eq, r5, r5, r1}, true, eq, "eq r5 r5 r1", "eq_r5_r5_r1"},
502      {{pl, r6, r6, r10}, true, pl, "pl r6 r6 r10", "pl_r6_r6_r10"},
503      {{vc, r6, r6, r12}, true, vc, "vc r6 r6 r12", "vc_r6_r6_r12"},
504      {{vs, r12, r12, r8}, true, vs, "vs r12 r12 r8", "vs_r12_r12_r8"},
505      {{cc, r10, r10, r3}, true, cc, "cc r10 r10 r3", "cc_r10_r10_r3"},
506      {{le, r9, r9, r3}, true, le, "le r9 r9 r3", "le_r9_r9_r3"},
507      {{mi, r1, r1, r4}, true, mi, "mi r1 r1 r4", "mi_r1_r1_r4"},
508      {{ls, r3, r3, r10}, true, ls, "ls r3 r3 r10", "ls_r3_r3_r10"},
509      {{ge, r8, r8, r11}, true, ge, "ge r8 r8 r11", "ge_r8_r8_r11"},
510      {{eq, r11, r11, r3}, true, eq, "eq r11 r11 r3", "eq_r11_r11_r3"},
511      {{gt, r0, r0, r11}, true, gt, "gt r0 r0 r11", "gt_r0_r0_r11"},
512      {{cs, r3, r3, r8}, true, cs, "cs r3 r3 r8", "cs_r3_r3_r8"},
513      {{eq, r8, r8, r4}, true, eq, "eq r8 r8 r4", "eq_r8_r8_r4"},
514      {{vs, r8, r8, r12}, true, vs, "vs r8 r8 r12", "vs_r8_r8_r12"},
515      {{vc, r3, r3, r7}, true, vc, "vc r3 r3 r7", "vc_r3_r3_r7"},
516      {{mi, r8, r8, r14}, true, mi, "mi r8 r8 r14", "mi_r8_r8_r14"},
517      {{cs, r0, r0, r12}, true, cs, "cs r0 r0 r12", "cs_r0_r0_r12"},
518      {{cs, r12, r12, r12}, true, cs, "cs r12 r12 r12", "cs_r12_r12_r12"},
519      {{le, r3, r3, r6}, true, le, "le r3 r3 r6", "le_r3_r3_r6"},
520      {{vc, r10, r10, r12}, true, vc, "vc r10 r10 r12", "vc_r10_r10_r12"},
521      {{ne, r12, r12, r5}, true, ne, "ne r12 r12 r5", "ne_r12_r12_r5"},
522      {{vc, r1, r1, r9}, true, vc, "vc r1 r1 r9", "vc_r1_r1_r9"},
523      {{pl, r2, r2, r11}, true, pl, "pl r2 r2 r11", "pl_r2_r2_r11"},
524      {{eq, r4, r4, r2}, true, eq, "eq r4 r4 r2", "eq_r4_r4_r2"},
525      {{vc, r0, r0, r9}, true, vc, "vc r0 r0 r9", "vc_r0_r0_r9"},
526      {{gt, r10, r10, r14}, true, gt, "gt r10 r10 r14", "gt_r10_r10_r14"},
527      {{vc, r6, r6, r0}, true, vc, "vc r6 r6 r0", "vc_r6_r6_r0"},
528      {{le, r10, r10, r3}, true, le, "le r10 r10 r3", "le_r10_r10_r3"},
529      {{mi, r1, r1, r7}, true, mi, "mi r1 r1 r7", "mi_r1_r1_r7"},
530      {{le, r5, r5, r4}, true, le, "le r5 r5 r4", "le_r5_r5_r4"},
531      {{mi, r4, r4, r0}, true, mi, "mi r4 r4 r0", "mi_r4_r4_r0"},
532      {{ge, r3, r3, r10}, true, ge, "ge r3 r3 r10", "ge_r3_r3_r10"},
533      {{vc, r4, r4, r10}, true, vc, "vc r4 r4 r10", "vc_r4_r4_r10"},
534      {{ge, r4, r4, r2}, true, ge, "ge r4 r4 r2", "ge_r4_r4_r2"},
535      {{eq, r6, r6, r8}, true, eq, "eq r6 r6 r8", "eq_r6_r6_r8"},
536      {{lt, r6, r6, r12}, true, lt, "lt r6 r6 r12", "lt_r6_r6_r12"},
537      {{cc, r1, r1, r1}, true, cc, "cc r1 r1 r1", "cc_r1_r1_r1"},
538      {{pl, r6, r6, r14}, true, pl, "pl r6 r6 r14", "pl_r6_r6_r14"},
539      {{cc, r11, r11, r6}, true, cc, "cc r11 r11 r6", "cc_r11_r11_r6"},
540      {{pl, r0, r0, r6}, true, pl, "pl r0 r0 r6", "pl_r0_r0_r6"},
541      {{eq, r4, r4, r11}, true, eq, "eq r4 r4 r11", "eq_r4_r4_r11"},
542      {{pl, r4, r4, r4}, true, pl, "pl r4 r4 r4", "pl_r4_r4_r4"},
543      {{pl, r1, r1, r14}, true, pl, "pl r1 r1 r14", "pl_r1_r1_r14"},
544      {{ne, r3, r3, r7}, true, ne, "ne r3 r3 r7", "ne_r3_r3_r7"},
545      {{cs, r3, r3, r11}, true, cs, "cs r3 r3 r11", "cs_r3_r3_r11"},
546      {{eq, r1, r1, r14}, true, eq, "eq r1 r1 r14", "eq_r1_r1_r14"},
547      {{lt, r4, r4, r11}, true, lt, "lt r4 r4 r11", "lt_r4_r4_r11"},
548      {{lt, r2, r2, r9}, true, lt, "lt r2 r2 r9", "lt_r2_r2_r9"},
549      {{cs, r10, r10, r8}, true, cs, "cs r10 r10 r8", "cs_r10_r10_r8"},
550      {{ls, r2, r2, r1}, true, ls, "ls r2 r2 r1", "ls_r2_r2_r1"},
551      {{le, r8, r8, r1}, true, le, "le r8 r8 r1", "le_r8_r8_r1"},
552      {{cc, r4, r4, r3}, true, cc, "cc r4 r4 r3", "cc_r4_r4_r3"},
553      {{cc, r9, r9, r3}, true, cc, "cc r9 r9 r3", "cc_r9_r9_r3"},
554      {{ge, r6, r6, r0}, true, ge, "ge r6 r6 r0", "ge_r6_r6_r0"},
555      {{pl, r6, r6, r2}, true, pl, "pl r6 r6 r2", "pl_r6_r6_r2"},
556      {{cs, r0, r0, r7}, true, cs, "cs r0 r0 r7", "cs_r0_r0_r7"},
557      {{pl, r7, r7, r8}, true, pl, "pl r7 r7 r8", "pl_r7_r7_r8"},
558      {{vs, r14, r14, r4}, true, vs, "vs r14 r14 r4", "vs_r14_r14_r4"},
559      {{gt, r4, r4, r8}, true, gt, "gt r4 r4 r8", "gt_r4_r4_r8"},
560      {{eq, r0, r0, r4}, true, eq, "eq r0 r0 r4", "eq_r0_r0_r4"},
561      {{cc, r8, r8, r6}, true, cc, "cc r8 r8 r6", "cc_r8_r8_r6"},
562      {{vc, r11, r11, r11}, true, vc, "vc r11 r11 r11", "vc_r11_r11_r11"},
563      {{vc, r14, r14, r5}, true, vc, "vc r14 r14 r5", "vc_r14_r14_r5"},
564      {{gt, r7, r7, r11}, true, gt, "gt r7 r7 r11", "gt_r7_r7_r11"},
565      {{cs, r1, r1, r4}, true, cs, "cs r1 r1 r4", "cs_r1_r1_r4"},
566      {{lt, r10, r10, r4}, true, lt, "lt r10 r10 r4", "lt_r10_r10_r4"},
567      {{ne, r11, r11, r11}, true, ne, "ne r11 r11 r11", "ne_r11_r11_r11"},
568      {{le, r8, r8, r2}, true, le, "le r8 r8 r2", "le_r8_r8_r2"},
569      {{le, r7, r7, r7}, true, le, "le r7 r7 r7", "le_r7_r7_r7"},
570      {{vc, r6, r6, r2}, true, vc, "vc r6 r6 r2", "vc_r6_r6_r2"},
571      {{eq, r14, r14, r9}, true, eq, "eq r14 r14 r9", "eq_r14_r14_r9"},
572      {{cs, r10, r10, r12}, true, cs, "cs r10 r10 r12", "cs_r10_r10_r12"},
573      {{lt, r0, r0, r8}, true, lt, "lt r0 r0 r8", "lt_r0_r0_r8"},
574      {{ne, r0, r0, r10}, true, ne, "ne r0 r0 r10", "ne_r0_r0_r10"},
575      {{cs, r0, r0, r1}, true, cs, "cs r0 r0 r1", "cs_r0_r0_r1"},
576      {{gt, r1, r1, r1}, true, gt, "gt r1 r1 r1", "gt_r1_r1_r1"},
577      {{hi, r11, r11, r2}, true, hi, "hi r11 r11 r2", "hi_r11_r11_r2"},
578      {{mi, r11, r11, r7}, true, mi, "mi r11 r11 r7", "mi_r11_r11_r7"},
579      {{mi, r14, r14, r1}, true, mi, "mi r14 r14 r1", "mi_r14_r14_r1"},
580      {{lt, r11, r11, r6}, true, lt, "lt r11 r11 r6", "lt_r11_r11_r6"},
581      {{le, r9, r9, r14}, true, le, "le r9 r9 r14", "le_r9_r9_r14"},
582      {{eq, r11, r11, r5}, true, eq, "eq r11 r11 r5", "eq_r11_r11_r5"},
583      {{hi, r5, r5, r4}, true, hi, "hi r5 r5 r4", "hi_r5_r5_r4"},
584      {{gt, r6, r6, r11}, true, gt, "gt r6 r6 r11", "gt_r6_r6_r11"},
585      {{cs, r14, r14, r8}, true, cs, "cs r14 r14 r8", "cs_r14_r14_r8"},
586      {{ls, r14, r14, r8}, true, ls, "ls r14 r14 r8", "ls_r14_r14_r8"},
587      {{cc, r10, r10, r14}, true, cc, "cc r10 r10 r14", "cc_r10_r10_r14"},
588      {{hi, r13, r13, r14}, true, hi, "hi r13 r13 r14", "hi_r13_r13_r14"},
589      {{mi, r4, r4, r7}, true, mi, "mi r4 r4 r7", "mi_r4_r4_r7"},
590      {{mi, r4, r4, r14}, true, mi, "mi r4 r4 r14", "mi_r4_r4_r14"},
591      {{eq, r0, r0, r6}, true, eq, "eq r0 r0 r6", "eq_r0_r0_r6"},
592      {{cs, r8, r8, r11}, true, cs, "cs r8 r8 r11", "cs_r8_r8_r11"},
593      {{vc, r0, r0, r10}, true, vc, "vc r0 r0 r10", "vc_r0_r0_r10"},
594      {{cc, r0, r0, r14}, true, cc, "cc r0 r0 r14", "cc_r0_r0_r14"}};
595 
596 // These headers each contain an array of `TestResult` with the reference output
597 // values. The reference arrays are names `kReference{mnemonic}`.
598 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-rd-is-rn-in-it-block-add-t32.h"
599 
600 
601 // The maximum number of errors to report in detail for each test.
602 const unsigned kErrorReportLimit = 8;
603 
604 typedef void (MacroAssembler::*Fn)(Condition cond,
605                                    Register rd,
606                                    Register rn,
607                                    const Operand& op);
608 
TestHelper(Fn instruction,const char * mnemonic,const TestResult reference[])609 void TestHelper(Fn instruction,
610                 const char* mnemonic,
611                 const TestResult reference[]) {
612   unsigned total_error_count = 0;
613   MacroAssembler masm(BUF_SIZE);
614 
615   masm.UseT32();
616 
617   for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
618     // Values to pass to the macro-assembler.
619     Condition cond = kTests[i].operands.cond;
620     Register rd = kTests[i].operands.rd;
621     Register rn = kTests[i].operands.rn;
622     Register rm = kTests[i].operands.rm;
623     Operand op(rm);
624 
625     int32_t start = masm.GetCursorOffset();
626     {
627       // We never generate more that 4 bytes, as IT instructions are only
628       // allowed for narrow encodings.
629       ExactAssemblyScope scope(&masm, 4, ExactAssemblyScope::kMaximumSize);
630       if (kTests[i].in_it_block) {
631         masm.it(kTests[i].it_condition);
632       }
633       (masm.*instruction)(cond, rd, rn, op);
634     }
635     int32_t end = masm.GetCursorOffset();
636 
637     const byte* result_ptr =
638         masm.GetBuffer()->GetOffsetAddress<const byte*>(start);
639     VIXL_ASSERT(start < end);
640     uint32_t result_size = end - start;
641 
642     if (Test::generate_test_trace()) {
643       // Print the result bytes.
644       printf("const byte kInstruction_%s_%s[] = {\n",
645              mnemonic,
646              kTests[i].identifier);
647       for (uint32_t j = 0; j < result_size; j++) {
648         if (j == 0) {
649           printf("  0x%02" PRIx8, result_ptr[j]);
650         } else {
651           printf(", 0x%02" PRIx8, result_ptr[j]);
652         }
653       }
654       // This comment is meant to be used by external tools to validate
655       // the encoding. We can parse the comment to figure out what
656       // instruction this corresponds to.
657       if (kTests[i].in_it_block) {
658         printf(" // It %s; %s %s\n};\n",
659                kTests[i].it_condition.GetName(),
660                mnemonic,
661                kTests[i].operands_description);
662       } else {
663         printf(" // %s %s\n};\n", mnemonic, kTests[i].operands_description);
664       }
665     } else {
666       // Check we've emitted the exact same encoding as present in the
667       // trace file. Only print up to `kErrorReportLimit` errors.
668       if (((result_size != reference[i].size) ||
669            (memcmp(result_ptr, reference[i].encoding, reference[i].size) !=
670             0)) &&
671           (++total_error_count <= kErrorReportLimit)) {
672         printf("Error when testing \"%s\" with operands \"%s\":\n",
673                mnemonic,
674                kTests[i].operands_description);
675         printf("  Expected: ");
676         for (uint32_t j = 0; j < reference[i].size; j++) {
677           if (j == 0) {
678             printf("0x%02" PRIx8, reference[i].encoding[j]);
679           } else {
680             printf(", 0x%02" PRIx8, reference[i].encoding[j]);
681           }
682         }
683         printf("\n");
684         printf("  Found:    ");
685         for (uint32_t j = 0; j < result_size; j++) {
686           if (j == 0) {
687             printf("0x%02" PRIx8, result_ptr[j]);
688           } else {
689             printf(", 0x%02" PRIx8, result_ptr[j]);
690           }
691         }
692         printf("\n");
693       }
694     }
695   }
696 
697   masm.FinalizeCode();
698 
699   if (Test::generate_test_trace()) {
700     // Finalize the trace file by writing the final `TestResult` array
701     // which links all generated instruction encodings.
702     printf("const TestResult kReference%s[] = {\n", mnemonic);
703     for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
704       printf("  {\n");
705       printf("    ARRAY_SIZE(kInstruction_%s_%s),\n",
706              mnemonic,
707              kTests[i].identifier);
708       printf("    kInstruction_%s_%s,\n", mnemonic, kTests[i].identifier);
709       printf("  },\n");
710     }
711     printf("};\n");
712   } else {
713     if (total_error_count > kErrorReportLimit) {
714       printf("%u other errors follow.\n",
715              total_error_count - kErrorReportLimit);
716     }
717     // Crash if the test failed.
718     VIXL_CHECK(total_error_count == 0);
719   }
720 }
721 
722 // Instantiate tests for each instruction in the list.
723 #define TEST(mnemonic)                                                      \
724   void Test_##mnemonic() {                                                  \
725     TestHelper(&MacroAssembler::mnemonic, #mnemonic, kReference##mnemonic); \
726   }                                                                         \
727   Test test_##mnemonic(                                                     \
728       "AARCH32_ASSEMBLER_COND_RD_RN_OPERAND_RM_RD_IS_RN_IN_IT_"             \
729       "BLOCK_" #mnemonic "_T32",                                            \
730       &Test_##mnemonic);
731 FOREACH_INSTRUCTION(TEST)
732 #undef TEST
733 
734 }  // namespace
735 #endif
736 
737 }  // namespace aarch32
738 }  // namespace vixl
739