• 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) \
52   M(adc)                       \
53   M(adcs)                      \
54   M(add)                       \
55   M(adds)                      \
56   M(and_)                      \
57   M(ands)                      \
58   M(bic)                       \
59   M(bics)                      \
60   M(eor)                       \
61   M(eors)                      \
62   M(orr)                       \
63   M(orrs)                      \
64   M(rsb)                       \
65   M(rsbs)                      \
66   M(rsc)                       \
67   M(rscs)                      \
68   M(sbc)                       \
69   M(sbcs)                      \
70   M(sub)                       \
71   M(subs)                      \
72   M(sxtab)                     \
73   M(sxtab16)                   \
74   M(sxtah)                     \
75   M(uxtab)                     \
76   M(uxtab16)                   \
77   M(uxtah)                     \
78   M(asr)                       \
79   M(asrs)                      \
80   M(lsl)                       \
81   M(lsls)                      \
82   M(lsr)                       \
83   M(lsrs)                      \
84   M(ror)                       \
85   M(rors)
86 
87 
88 // The following definitions are defined again in each generated test, therefore
89 // we need to place them in an anomymous namespace. It expresses that they are
90 // local to this file only, and the compiler is not allowed to share these types
91 // across test files during template instantiation. Specifically, `Operands` has
92 // various layouts across generated tests so it absolutely cannot be shared.
93 
94 #ifdef VIXL_INCLUDE_TARGET_A32
95 namespace {
96 
97 // Values to be passed to the assembler to produce the instruction under test.
98 struct Operands {
99   Condition cond;
100   Register rd;
101   Register rn;
102   Register rm;
103 };
104 
105 // This structure contains all data needed to test one specific
106 // instruction.
107 struct TestData {
108   // The `operands` field represents what to pass to the assembler to
109   // produce the instruction.
110   Operands operands;
111   // True if we need to generate an IT instruction for this test to be valid.
112   bool in_it_block;
113   // The condition to give the IT instruction, this will be set to "al" by
114   // default.
115   Condition it_condition;
116   // Description of the operands, used for error reporting.
117   const char* operands_description;
118   // Unique identifier, used for generating traces.
119   const char* identifier;
120 };
121 
122 struct TestResult {
123   size_t size;
124   const byte* encoding;
125 };
126 
127 // Each element of this array produce one instruction encoding.
128 const TestData kTests[] =
129     {{{le, r4, r5, r14}, false, al, "le r4 r5 r14", "le_r4_r5_r14"},
130      {{ge, r5, r11, r10}, false, al, "ge r5 r11 r10", "ge_r5_r11_r10"},
131      {{ls, r0, r9, r9}, false, al, "ls r0 r9 r9", "ls_r0_r9_r9"},
132      {{le, r8, r7, r2}, false, al, "le r8 r7 r2", "le_r8_r7_r2"},
133      {{eq, r1, r10, r13}, false, al, "eq r1 r10 r13", "eq_r1_r10_r13"},
134      {{le, r9, r12, r2}, false, al, "le r9 r12 r2", "le_r9_r12_r2"},
135      {{pl, r6, r1, r5}, false, al, "pl r6 r1 r5", "pl_r6_r1_r5"},
136      {{ge, r1, r12, r6}, false, al, "ge r1 r12 r6", "ge_r1_r12_r6"},
137      {{cc, r13, r12, r3}, false, al, "cc r13 r12 r3", "cc_r13_r12_r3"},
138      {{gt, r2, r4, r9}, false, al, "gt r2 r4 r9", "gt_r2_r4_r9"},
139      {{le, r3, r9, r10}, false, al, "le r3 r9 r10", "le_r3_r9_r10"},
140      {{gt, r11, r1, r9}, false, al, "gt r11 r1 r9", "gt_r11_r1_r9"},
141      {{cc, r8, r6, r11}, false, al, "cc r8 r6 r11", "cc_r8_r6_r11"},
142      {{cs, r12, r9, r3}, false, al, "cs r12 r9 r3", "cs_r12_r9_r3"},
143      {{eq, r9, r14, r10}, false, al, "eq r9 r14 r10", "eq_r9_r14_r10"},
144      {{gt, r9, r0, r1}, false, al, "gt r9 r0 r1", "gt_r9_r0_r1"},
145      {{pl, r11, r8, r2}, false, al, "pl r11 r8 r2", "pl_r11_r8_r2"},
146      {{mi, r7, r1, r2}, false, al, "mi r7 r1 r2", "mi_r7_r1_r2"},
147      {{vs, r8, r6, r7}, false, al, "vs r8 r6 r7", "vs_r8_r6_r7"},
148      {{ne, r14, r2, r13}, false, al, "ne r14 r2 r13", "ne_r14_r2_r13"},
149      {{hi, r3, r3, r8}, false, al, "hi r3 r3 r8", "hi_r3_r3_r8"},
150      {{vc, r10, r8, r14}, false, al, "vc r10 r8 r14", "vc_r10_r8_r14"},
151      {{ls, r2, r11, r0}, false, al, "ls r2 r11 r0", "ls_r2_r11_r0"},
152      {{ge, r8, r10, r0}, false, al, "ge r8 r10 r0", "ge_r8_r10_r0"},
153      {{mi, r8, r10, r5}, false, al, "mi r8 r10 r5", "mi_r8_r10_r5"},
154      {{pl, r1, r0, r9}, false, al, "pl r1 r0 r9", "pl_r1_r0_r9"},
155      {{gt, r6, r7, r3}, false, al, "gt r6 r7 r3", "gt_r6_r7_r3"},
156      {{vs, r7, r9, r9}, false, al, "vs r7 r9 r9", "vs_r7_r9_r9"},
157      {{al, r9, r4, r2}, false, al, "al r9 r4 r2", "al_r9_r4_r2"},
158      {{le, r3, r1, r2}, false, al, "le r3 r1 r2", "le_r3_r1_r2"},
159      {{mi, r6, r14, r0}, false, al, "mi r6 r14 r0", "mi_r6_r14_r0"},
160      {{vc, r7, r10, r11}, false, al, "vc r7 r10 r11", "vc_r7_r10_r11"},
161      {{hi, r13, r2, r10}, false, al, "hi r13 r2 r10", "hi_r13_r2_r10"},
162      {{cs, r5, r4, r12}, false, al, "cs r5 r4 r12", "cs_r5_r4_r12"},
163      {{ls, r13, r9, r11}, false, al, "ls r13 r9 r11", "ls_r13_r9_r11"},
164      {{ne, r2, r10, r12}, false, al, "ne r2 r10 r12", "ne_r2_r10_r12"},
165      {{vc, r4, r6, r8}, false, al, "vc r4 r6 r8", "vc_r4_r6_r8"},
166      {{lt, r13, r0, r13}, false, al, "lt r13 r0 r13", "lt_r13_r0_r13"},
167      {{pl, r11, r14, r5}, false, al, "pl r11 r14 r5", "pl_r11_r14_r5"},
168      {{cs, r8, r11, r3}, false, al, "cs r8 r11 r3", "cs_r8_r11_r3"},
169      {{cs, r4, r1, r7}, false, al, "cs r4 r1 r7", "cs_r4_r1_r7"},
170      {{al, r0, r12, r13}, false, al, "al r0 r12 r13", "al_r0_r12_r13"},
171      {{gt, r3, r6, r0}, false, al, "gt r3 r6 r0", "gt_r3_r6_r0"},
172      {{vc, r6, r9, r0}, false, al, "vc r6 r9 r0", "vc_r6_r9_r0"},
173      {{cc, r2, r2, r12}, false, al, "cc r2 r2 r12", "cc_r2_r2_r12"},
174      {{cs, r4, r13, r1}, false, al, "cs r4 r13 r1", "cs_r4_r13_r1"},
175      {{mi, r12, r12, r10}, false, al, "mi r12 r12 r10", "mi_r12_r12_r10"},
176      {{hi, r8, r9, r14}, false, al, "hi r8 r9 r14", "hi_r8_r9_r14"},
177      {{hi, r4, r3, r7}, false, al, "hi r4 r3 r7", "hi_r4_r3_r7"},
178      {{ne, r11, r10, r1}, false, al, "ne r11 r10 r1", "ne_r11_r10_r1"},
179      {{cc, r2, r6, r3}, false, al, "cc r2 r6 r3", "cc_r2_r6_r3"},
180      {{cs, r6, r6, r0}, false, al, "cs r6 r6 r0", "cs_r6_r6_r0"},
181      {{vc, r13, r2, r9}, false, al, "vc r13 r2 r9", "vc_r13_r2_r9"},
182      {{vc, r7, r13, r14}, false, al, "vc r7 r13 r14", "vc_r7_r13_r14"},
183      {{pl, r11, r14, r4}, false, al, "pl r11 r14 r4", "pl_r11_r14_r4"},
184      {{lt, r12, r14, r8}, false, al, "lt r12 r14 r8", "lt_r12_r14_r8"},
185      {{cs, r2, r11, r14}, false, al, "cs r2 r11 r14", "cs_r2_r11_r14"},
186      {{le, r12, r13, r2}, false, al, "le r12 r13 r2", "le_r12_r13_r2"},
187      {{le, r5, r6, r14}, false, al, "le r5 r6 r14", "le_r5_r6_r14"},
188      {{vc, r3, r14, r8}, false, al, "vc r3 r14 r8", "vc_r3_r14_r8"},
189      {{lt, r7, r6, r14}, false, al, "lt r7 r6 r14", "lt_r7_r6_r14"},
190      {{ls, r0, r13, r12}, false, al, "ls r0 r13 r12", "ls_r0_r13_r12"},
191      {{ge, r10, r9, r14}, false, al, "ge r10 r9 r14", "ge_r10_r9_r14"},
192      {{le, r11, r12, r1}, false, al, "le r11 r12 r1", "le_r11_r12_r1"},
193      {{al, r2, r12, r14}, false, al, "al r2 r12 r14", "al_r2_r12_r14"},
194      {{cs, r6, r4, r0}, false, al, "cs r6 r4 r0", "cs_r6_r4_r0"},
195      {{vs, r5, r0, r3}, false, al, "vs r5 r0 r3", "vs_r5_r0_r3"},
196      {{le, r8, r8, r0}, false, al, "le r8 r8 r0", "le_r8_r8_r0"},
197      {{gt, r1, r5, r4}, false, al, "gt r1 r5 r4", "gt_r1_r5_r4"},
198      {{le, r4, r3, r4}, false, al, "le r4 r3 r4", "le_r4_r3_r4"},
199      {{pl, r9, r7, r10}, false, al, "pl r9 r7 r10", "pl_r9_r7_r10"},
200      {{ls, r8, r7, r14}, false, al, "ls r8 r7 r14", "ls_r8_r7_r14"},
201      {{vc, r9, r10, r6}, false, al, "vc r9 r10 r6", "vc_r9_r10_r6"},
202      {{hi, r2, r4, r9}, false, al, "hi r2 r4 r9", "hi_r2_r4_r9"},
203      {{cs, r0, r2, r13}, false, al, "cs r0 r2 r13", "cs_r0_r2_r13"},
204      {{vs, r3, r6, r12}, false, al, "vs r3 r6 r12", "vs_r3_r6_r12"},
205      {{cc, r14, r14, r7}, false, al, "cc r14 r14 r7", "cc_r14_r14_r7"},
206      {{vc, r10, r6, r4}, false, al, "vc r10 r6 r4", "vc_r10_r6_r4"},
207      {{cc, r1, r6, r10}, false, al, "cc r1 r6 r10", "cc_r1_r6_r10"},
208      {{vs, r13, r10, r11}, false, al, "vs r13 r10 r11", "vs_r13_r10_r11"},
209      {{ls, r5, r7, r12}, false, al, "ls r5 r7 r12", "ls_r5_r7_r12"},
210      {{eq, r6, r4, r3}, false, al, "eq r6 r4 r3", "eq_r6_r4_r3"},
211      {{mi, r5, r9, r2}, false, al, "mi r5 r9 r2", "mi_r5_r9_r2"},
212      {{lt, r7, r1, r9}, false, al, "lt r7 r1 r9", "lt_r7_r1_r9"},
213      {{ne, r12, r7, r0}, false, al, "ne r12 r7 r0", "ne_r12_r7_r0"},
214      {{eq, r0, r6, r7}, false, al, "eq r0 r6 r7", "eq_r0_r6_r7"},
215      {{pl, r7, r3, r9}, false, al, "pl r7 r3 r9", "pl_r7_r3_r9"},
216      {{pl, r11, r11, r13}, false, al, "pl r11 r11 r13", "pl_r11_r11_r13"},
217      {{gt, r0, r10, r5}, false, al, "gt r0 r10 r5", "gt_r0_r10_r5"},
218      {{mi, r14, r1, r10}, false, al, "mi r14 r1 r10", "mi_r14_r1_r10"},
219      {{mi, r5, r14, r0}, false, al, "mi r5 r14 r0", "mi_r5_r14_r0"},
220      {{ne, r12, r9, r13}, false, al, "ne r12 r9 r13", "ne_r12_r9_r13"},
221      {{hi, r8, r5, r11}, false, al, "hi r8 r5 r11", "hi_r8_r5_r11"},
222      {{ls, r7, r0, r5}, false, al, "ls r7 r0 r5", "ls_r7_r0_r5"},
223      {{lt, r5, r1, r7}, false, al, "lt r5 r1 r7", "lt_r5_r1_r7"},
224      {{cc, r2, r8, r4}, false, al, "cc r2 r8 r4", "cc_r2_r8_r4"},
225      {{lt, r3, r0, r5}, false, al, "lt r3 r0 r5", "lt_r3_r0_r5"},
226      {{pl, r4, r9, r7}, false, al, "pl r4 r9 r7", "pl_r4_r9_r7"},
227      {{eq, r13, r8, r10}, false, al, "eq r13 r8 r10", "eq_r13_r8_r10"},
228      {{ge, r6, r10, r10}, false, al, "ge r6 r10 r10", "ge_r6_r10_r10"},
229      {{lt, r5, r5, r7}, false, al, "lt r5 r5 r7", "lt_r5_r5_r7"},
230      {{hi, r6, r3, r9}, false, al, "hi r6 r3 r9", "hi_r6_r3_r9"},
231      {{hi, r14, r12, r10}, false, al, "hi r14 r12 r10", "hi_r14_r12_r10"},
232      {{lt, r9, r13, r14}, false, al, "lt r9 r13 r14", "lt_r9_r13_r14"},
233      {{al, r0, r12, r7}, false, al, "al r0 r12 r7", "al_r0_r12_r7"},
234      {{eq, r14, r8, r11}, false, al, "eq r14 r8 r11", "eq_r14_r8_r11"},
235      {{ne, r9, r11, r1}, false, al, "ne r9 r11 r1", "ne_r9_r11_r1"},
236      {{ge, r5, r0, r3}, false, al, "ge r5 r0 r3", "ge_r5_r0_r3"},
237      {{pl, r12, r0, r1}, false, al, "pl r12 r0 r1", "pl_r12_r0_r1"},
238      {{lt, r13, r7, r11}, false, al, "lt r13 r7 r11", "lt_r13_r7_r11"},
239      {{eq, r4, r6, r6}, false, al, "eq r4 r6 r6", "eq_r4_r6_r6"},
240      {{cs, r1, r14, r0}, false, al, "cs r1 r14 r0", "cs_r1_r14_r0"},
241      {{hi, r7, r7, r6}, false, al, "hi r7 r7 r6", "hi_r7_r7_r6"},
242      {{hi, r1, r0, r3}, false, al, "hi r1 r0 r3", "hi_r1_r0_r3"},
243      {{pl, r12, r2, r0}, false, al, "pl r12 r2 r0", "pl_r12_r2_r0"},
244      {{mi, r3, r0, r3}, false, al, "mi r3 r0 r3", "mi_r3_r0_r3"},
245      {{al, r14, r4, r3}, false, al, "al r14 r4 r3", "al_r14_r4_r3"},
246      {{vs, r4, r2, r9}, false, al, "vs r4 r2 r9", "vs_r4_r2_r9"},
247      {{vs, r1, r9, r12}, false, al, "vs r1 r9 r12", "vs_r1_r9_r12"},
248      {{vs, r3, r6, r9}, false, al, "vs r3 r6 r9", "vs_r3_r6_r9"},
249      {{cc, r4, r1, r8}, false, al, "cc r4 r1 r8", "cc_r4_r1_r8"},
250      {{ls, r10, r11, r14}, false, al, "ls r10 r11 r14", "ls_r10_r11_r14"},
251      {{le, r11, r7, r2}, false, al, "le r11 r7 r2", "le_r11_r7_r2"},
252      {{le, r6, r9, r14}, false, al, "le r6 r9 r14", "le_r6_r9_r14"},
253      {{al, r1, r3, r11}, false, al, "al r1 r3 r11", "al_r1_r3_r11"},
254      {{lt, r0, r2, r2}, false, al, "lt r0 r2 r2", "lt_r0_r2_r2"},
255      {{eq, r11, r6, r8}, false, al, "eq r11 r6 r8", "eq_r11_r6_r8"},
256      {{ls, r7, r12, r5}, false, al, "ls r7 r12 r5", "ls_r7_r12_r5"},
257      {{vc, r4, r11, r0}, false, al, "vc r4 r11 r0", "vc_r4_r11_r0"},
258      {{ls, r7, r14, r2}, false, al, "ls r7 r14 r2", "ls_r7_r14_r2"},
259      {{le, r7, r12, r1}, false, al, "le r7 r12 r1", "le_r7_r12_r1"},
260      {{le, r1, r14, r13}, false, al, "le r1 r14 r13", "le_r1_r14_r13"},
261      {{le, r11, r3, r9}, false, al, "le r11 r3 r9", "le_r11_r3_r9"},
262      {{ne, r14, r13, r1}, false, al, "ne r14 r13 r1", "ne_r14_r13_r1"},
263      {{ne, r5, r1, r10}, false, al, "ne r5 r1 r10", "ne_r5_r1_r10"},
264      {{cc, r7, r4, r3}, false, al, "cc r7 r4 r3", "cc_r7_r4_r3"},
265      {{lt, r8, r1, r1}, false, al, "lt r8 r1 r1", "lt_r8_r1_r1"},
266      {{al, r5, r0, r1}, false, al, "al r5 r0 r1", "al_r5_r0_r1"},
267      {{ge, r11, r13, r9}, false, al, "ge r11 r13 r9", "ge_r11_r13_r9"},
268      {{gt, r5, r9, r5}, false, al, "gt r5 r9 r5", "gt_r5_r9_r5"},
269      {{cc, r2, r8, r3}, false, al, "cc r2 r8 r3", "cc_r2_r8_r3"},
270      {{eq, r6, r6, r12}, false, al, "eq r6 r6 r12", "eq_r6_r6_r12"},
271      {{vc, r3, r10, r13}, false, al, "vc r3 r10 r13", "vc_r3_r10_r13"},
272      {{vc, r9, r13, r1}, false, al, "vc r9 r13 r1", "vc_r9_r13_r1"},
273      {{lt, r7, r0, r0}, false, al, "lt r7 r0 r0", "lt_r7_r0_r0"},
274      {{cc, r6, r6, r1}, false, al, "cc r6 r6 r1", "cc_r6_r6_r1"},
275      {{mi, r8, r1, r9}, false, al, "mi r8 r1 r9", "mi_r8_r1_r9"},
276      {{ls, r14, r10, r10}, false, al, "ls r14 r10 r10", "ls_r14_r10_r10"},
277      {{ge, r7, r13, r1}, false, al, "ge r7 r13 r1", "ge_r7_r13_r1"},
278      {{le, r0, r4, r3}, false, al, "le r0 r4 r3", "le_r0_r4_r3"},
279      {{cc, r12, r10, r10}, false, al, "cc r12 r10 r10", "cc_r12_r10_r10"},
280      {{ge, r5, r0, r10}, false, al, "ge r5 r0 r10", "ge_r5_r0_r10"},
281      {{vs, r8, r3, r10}, false, al, "vs r8 r3 r10", "vs_r8_r3_r10"},
282      {{ge, r11, r12, r2}, false, al, "ge r11 r12 r2", "ge_r11_r12_r2"},
283      {{ne, r14, r4, r8}, false, al, "ne r14 r4 r8", "ne_r14_r4_r8"},
284      {{mi, r3, r0, r4}, false, al, "mi r3 r0 r4", "mi_r3_r0_r4"},
285      {{gt, r13, r9, r6}, false, al, "gt r13 r9 r6", "gt_r13_r9_r6"},
286      {{ls, r1, r14, r2}, false, al, "ls r1 r14 r2", "ls_r1_r14_r2"},
287      {{eq, r11, r3, r12}, false, al, "eq r11 r3 r12", "eq_r11_r3_r12"},
288      {{ge, r4, r13, r4}, false, al, "ge r4 r13 r4", "ge_r4_r13_r4"},
289      {{al, r5, r9, r7}, false, al, "al r5 r9 r7", "al_r5_r9_r7"},
290      {{le, r11, r9, r0}, false, al, "le r11 r9 r0", "le_r11_r9_r0"},
291      {{mi, r13, r10, r12}, false, al, "mi r13 r10 r12", "mi_r13_r10_r12"},
292      {{hi, r5, r5, r10}, false, al, "hi r5 r5 r10", "hi_r5_r5_r10"},
293      {{ge, r4, r6, r14}, false, al, "ge r4 r6 r14", "ge_r4_r6_r14"},
294      {{le, r5, r5, r7}, false, al, "le r5 r5 r7", "le_r5_r5_r7"},
295      {{pl, r12, r2, r8}, false, al, "pl r12 r2 r8", "pl_r12_r2_r8"},
296      {{al, r7, r8, r10}, false, al, "al r7 r8 r10", "al_r7_r8_r10"},
297      {{vc, r8, r11, r13}, false, al, "vc r8 r11 r13", "vc_r8_r11_r13"},
298      {{ne, r14, r2, r12}, false, al, "ne r14 r2 r12", "ne_r14_r2_r12"},
299      {{eq, r10, r4, r2}, false, al, "eq r10 r4 r2", "eq_r10_r4_r2"},
300      {{al, r6, r2, r5}, false, al, "al r6 r2 r5", "al_r6_r2_r5"},
301      {{al, r1, r6, r2}, false, al, "al r1 r6 r2", "al_r1_r6_r2"},
302      {{vs, r0, r7, r14}, false, al, "vs r0 r7 r14", "vs_r0_r7_r14"},
303      {{hi, r9, r7, r0}, false, al, "hi r9 r7 r0", "hi_r9_r7_r0"},
304      {{ne, r8, r11, r13}, false, al, "ne r8 r11 r13", "ne_r8_r11_r13"},
305      {{ne, r9, r8, r12}, false, al, "ne r9 r8 r12", "ne_r9_r8_r12"},
306      {{al, r14, r8, r6}, false, al, "al r14 r8 r6", "al_r14_r8_r6"},
307      {{vc, r8, r0, r3}, false, al, "vc r8 r0 r3", "vc_r8_r0_r3"},
308      {{pl, r11, r9, r0}, false, al, "pl r11 r9 r0", "pl_r11_r9_r0"},
309      {{al, r7, r9, r9}, false, al, "al r7 r9 r9", "al_r7_r9_r9"},
310      {{ls, r0, r8, r3}, false, al, "ls r0 r8 r3", "ls_r0_r8_r3"},
311      {{lt, r5, r13, r6}, false, al, "lt r5 r13 r6", "lt_r5_r13_r6"},
312      {{ge, r6, r5, r13}, false, al, "ge r6 r5 r13", "ge_r6_r5_r13"},
313      {{cs, r11, r7, r3}, false, al, "cs r11 r7 r3", "cs_r11_r7_r3"},
314      {{vs, r8, r0, r6}, false, al, "vs r8 r0 r6", "vs_r8_r0_r6"},
315      {{hi, r0, r12, r6}, false, al, "hi r0 r12 r6", "hi_r0_r12_r6"},
316      {{eq, r14, r5, r12}, false, al, "eq r14 r5 r12", "eq_r14_r5_r12"},
317      {{lt, r1, r4, r13}, false, al, "lt r1 r4 r13", "lt_r1_r4_r13"},
318      {{hi, r6, r4, r2}, false, al, "hi r6 r4 r2", "hi_r6_r4_r2"},
319      {{lt, r10, r10, r9}, false, al, "lt r10 r10 r9", "lt_r10_r10_r9"},
320      {{pl, r14, r7, r4}, false, al, "pl r14 r7 r4", "pl_r14_r7_r4"},
321      {{ge, r8, r3, r4}, false, al, "ge r8 r3 r4", "ge_r8_r3_r4"},
322      {{al, r11, r1, r14}, false, al, "al r11 r1 r14", "al_r11_r1_r14"},
323      {{ge, r7, r8, r9}, false, al, "ge r7 r8 r9", "ge_r7_r8_r9"},
324      {{le, r10, r10, r8}, false, al, "le r10 r10 r8", "le_r10_r10_r8"},
325      {{hi, r3, r3, r7}, false, al, "hi r3 r3 r7", "hi_r3_r3_r7"},
326      {{cc, r3, r0, r14}, false, al, "cc r3 r0 r14", "cc_r3_r0_r14"},
327      {{al, r8, r9, r1}, false, al, "al r8 r9 r1", "al_r8_r9_r1"},
328      {{gt, r6, r13, r7}, false, al, "gt r6 r13 r7", "gt_r6_r13_r7"},
329      {{ls, r11, r3, r1}, false, al, "ls r11 r3 r1", "ls_r11_r3_r1"},
330      {{cc, r14, r0, r13}, false, al, "cc r14 r0 r13", "cc_r14_r0_r13"},
331      {{gt, r4, r4, r4}, false, al, "gt r4 r4 r4", "gt_r4_r4_r4"},
332      {{al, r8, r13, r1}, false, al, "al r8 r13 r1", "al_r8_r13_r1"},
333      {{mi, r8, r4, r6}, false, al, "mi r8 r4 r6", "mi_r8_r4_r6"},
334      {{vc, r12, r7, r11}, false, al, "vc r12 r7 r11", "vc_r12_r7_r11"},
335      {{cs, r0, r1, r0}, false, al, "cs r0 r1 r0", "cs_r0_r1_r0"},
336      {{cc, r13, r14, r0}, false, al, "cc r13 r14 r0", "cc_r13_r14_r0"},
337      {{eq, r4, r7, r11}, false, al, "eq r4 r7 r11", "eq_r4_r7_r11"},
338      {{ls, r11, r2, r0}, false, al, "ls r11 r2 r0", "ls_r11_r2_r0"},
339      {{gt, r10, r2, r3}, false, al, "gt r10 r2 r3", "gt_r10_r2_r3"},
340      {{al, r6, r1, r7}, false, al, "al r6 r1 r7", "al_r6_r1_r7"},
341      {{cs, r10, r13, r0}, false, al, "cs r10 r13 r0", "cs_r10_r13_r0"},
342      {{lt, r11, r2, r6}, false, al, "lt r11 r2 r6", "lt_r11_r2_r6"},
343      {{pl, r4, r13, r6}, false, al, "pl r4 r13 r6", "pl_r4_r13_r6"},
344      {{cs, r3, r0, r9}, false, al, "cs r3 r0 r9", "cs_r3_r0_r9"},
345      {{gt, r4, r6, r14}, false, al, "gt r4 r6 r14", "gt_r4_r6_r14"},
346      {{eq, r6, r8, r0}, false, al, "eq r6 r8 r0", "eq_r6_r8_r0"},
347      {{cc, r5, r5, r2}, false, al, "cc r5 r5 r2", "cc_r5_r5_r2"},
348      {{al, r9, r3, r7}, false, al, "al r9 r3 r7", "al_r9_r3_r7"},
349      {{cc, r12, r0, r8}, false, al, "cc r12 r0 r8", "cc_r12_r0_r8"},
350      {{le, r4, r1, r7}, false, al, "le r4 r1 r7", "le_r4_r1_r7"},
351      {{gt, r3, r12, r7}, false, al, "gt r3 r12 r7", "gt_r3_r12_r7"},
352      {{vc, r4, r3, r14}, false, al, "vc r4 r3 r14", "vc_r4_r3_r14"},
353      {{le, r0, r7, r10}, false, al, "le r0 r7 r10", "le_r0_r7_r10"},
354      {{vs, r14, r8, r13}, false, al, "vs r14 r8 r13", "vs_r14_r8_r13"},
355      {{hi, r9, r0, r11}, false, al, "hi r9 r0 r11", "hi_r9_r0_r11"},
356      {{eq, r8, r13, r0}, false, al, "eq r8 r13 r0", "eq_r8_r13_r0"},
357      {{vc, r10, r9, r2}, false, al, "vc r10 r9 r2", "vc_r10_r9_r2"},
358      {{al, r0, r13, r10}, false, al, "al r0 r13 r10", "al_r0_r13_r10"},
359      {{ne, r5, r4, r6}, false, al, "ne r5 r4 r6", "ne_r5_r4_r6"},
360      {{cc, r7, r13, r1}, false, al, "cc r7 r13 r1", "cc_r7_r13_r1"},
361      {{lt, r1, r14, r11}, false, al, "lt r1 r14 r11", "lt_r1_r14_r11"},
362      {{vc, r13, r10, r14}, false, al, "vc r13 r10 r14", "vc_r13_r10_r14"},
363      {{le, r3, r0, r4}, false, al, "le r3 r0 r4", "le_r3_r0_r4"},
364      {{al, r11, r4, r5}, false, al, "al r11 r4 r5", "al_r11_r4_r5"},
365      {{lt, r0, r8, r8}, false, al, "lt r0 r8 r8", "lt_r0_r8_r8"},
366      {{al, r13, r12, r7}, false, al, "al r13 r12 r7", "al_r13_r12_r7"},
367      {{ls, r12, r13, r13}, false, al, "ls r12 r13 r13", "ls_r12_r13_r13"},
368      {{vc, r8, r2, r9}, false, al, "vc r8 r2 r9", "vc_r8_r2_r9"},
369      {{ne, r14, r9, r3}, false, al, "ne r14 r9 r3", "ne_r14_r9_r3"},
370      {{pl, r12, r11, r6}, false, al, "pl r12 r11 r6", "pl_r12_r11_r6"},
371      {{eq, r0, r3, r5}, false, al, "eq r0 r3 r5", "eq_r0_r3_r5"},
372      {{hi, r11, r3, r14}, false, al, "hi r11 r3 r14", "hi_r11_r3_r14"},
373      {{le, r3, r7, r4}, false, al, "le r3 r7 r4", "le_r3_r7_r4"},
374      {{ne, r6, r9, r8}, false, al, "ne r6 r9 r8", "ne_r6_r9_r8"},
375      {{vc, r11, r11, r11}, false, al, "vc r11 r11 r11", "vc_r11_r11_r11"},
376      {{ge, r3, r1, r10}, false, al, "ge r3 r1 r10", "ge_r3_r1_r10"},
377      {{gt, r5, r14, r13}, false, al, "gt r5 r14 r13", "gt_r5_r14_r13"},
378      {{le, r7, r0, r13}, false, al, "le r7 r0 r13", "le_r7_r0_r13"},
379      {{lt, r8, r5, r1}, false, al, "lt r8 r5 r1", "lt_r8_r5_r1"},
380      {{le, r3, r4, r8}, false, al, "le r3 r4 r8", "le_r3_r4_r8"},
381      {{ne, r5, r11, r13}, false, al, "ne r5 r11 r13", "ne_r5_r11_r13"},
382      {{ge, r9, r8, r2}, false, al, "ge r9 r8 r2", "ge_r9_r8_r2"},
383      {{gt, r9, r5, r12}, false, al, "gt r9 r5 r12", "gt_r9_r5_r12"},
384      {{pl, r9, r8, r1}, false, al, "pl r9 r8 r1", "pl_r9_r8_r1"},
385      {{le, r3, r12, r4}, false, al, "le r3 r12 r4", "le_r3_r12_r4"},
386      {{eq, r5, r6, r9}, false, al, "eq r5 r6 r9", "eq_r5_r6_r9"},
387      {{ne, r14, r4, r13}, false, al, "ne r14 r4 r13", "ne_r14_r4_r13"},
388      {{ge, r3, r9, r2}, false, al, "ge r3 r9 r2", "ge_r3_r9_r2"},
389      {{ls, r13, r0, r10}, false, al, "ls r13 r0 r10", "ls_r13_r0_r10"},
390      {{mi, r14, r0, r2}, false, al, "mi r14 r0 r2", "mi_r14_r0_r2"},
391      {{cs, r11, r1, r3}, false, al, "cs r11 r1 r3", "cs_r11_r1_r3"},
392      {{ne, r8, r9, r10}, false, al, "ne r8 r9 r10", "ne_r8_r9_r10"},
393      {{gt, r9, r10, r4}, false, al, "gt r9 r10 r4", "gt_r9_r10_r4"},
394      {{le, r2, r8, r4}, false, al, "le r2 r8 r4", "le_r2_r8_r4"},
395      {{al, r6, r14, r11}, false, al, "al r6 r14 r11", "al_r6_r14_r11"},
396      {{eq, r3, r14, r14}, false, al, "eq r3 r14 r14", "eq_r3_r14_r14"},
397      {{pl, r9, r9, r3}, false, al, "pl r9 r9 r3", "pl_r9_r9_r3"},
398      {{ge, r5, r13, r12}, false, al, "ge r5 r13 r12", "ge_r5_r13_r12"},
399      {{mi, r10, r6, r5}, false, al, "mi r10 r6 r5", "mi_r10_r6_r5"},
400      {{ls, r14, r13, r12}, false, al, "ls r14 r13 r12", "ls_r14_r13_r12"},
401      {{lt, r10, r9, r10}, false, al, "lt r10 r9 r10", "lt_r10_r9_r10"},
402      {{ls, r7, r4, r9}, false, al, "ls r7 r4 r9", "ls_r7_r4_r9"},
403      {{cs, r9, r10, r7}, false, al, "cs r9 r10 r7", "cs_r9_r10_r7"},
404      {{eq, r4, r2, r2}, false, al, "eq r4 r2 r2", "eq_r4_r2_r2"},
405      {{lt, r14, r13, r4}, false, al, "lt r14 r13 r4", "lt_r14_r13_r4"},
406      {{al, r0, r3, r5}, false, al, "al r0 r3 r5", "al_r0_r3_r5"},
407      {{vs, r9, r6, r7}, false, al, "vs r9 r6 r7", "vs_r9_r6_r7"},
408      {{ls, r0, r6, r4}, false, al, "ls r0 r6 r4", "ls_r0_r6_r4"},
409      {{ne, r7, r10, r14}, false, al, "ne r7 r10 r14", "ne_r7_r10_r14"},
410      {{le, r2, r12, r1}, false, al, "le r2 r12 r1", "le_r2_r12_r1"},
411      {{cs, r1, r5, r0}, false, al, "cs r1 r5 r0", "cs_r1_r5_r0"},
412      {{pl, r0, r9, r1}, false, al, "pl r0 r9 r1", "pl_r0_r9_r1"},
413      {{mi, r2, r2, r5}, false, al, "mi r2 r2 r5", "mi_r2_r2_r5"},
414      {{hi, r5, r1, r12}, false, al, "hi r5 r1 r12", "hi_r5_r1_r12"},
415      {{ls, r13, r14, r7}, false, al, "ls r13 r14 r7", "ls_r13_r14_r7"},
416      {{lt, r0, r4, r3}, false, al, "lt r0 r4 r3", "lt_r0_r4_r3"},
417      {{cc, r8, r13, r2}, false, al, "cc r8 r13 r2", "cc_r8_r13_r2"},
418      {{ls, r7, r8, r14}, false, al, "ls r7 r8 r14", "ls_r7_r8_r14"},
419      {{hi, r13, r11, r13}, false, al, "hi r13 r11 r13", "hi_r13_r11_r13"},
420      {{ge, r13, r7, r6}, false, al, "ge r13 r7 r6", "ge_r13_r7_r6"},
421      {{mi, r3, r2, r0}, false, al, "mi r3 r2 r0", "mi_r3_r2_r0"},
422      {{cs, r12, r0, r10}, false, al, "cs r12 r0 r10", "cs_r12_r0_r10"},
423      {{vs, r9, r10, r8}, false, al, "vs r9 r10 r8", "vs_r9_r10_r8"},
424      {{ls, r2, r8, r8}, false, al, "ls r2 r8 r8", "ls_r2_r8_r8"},
425      {{ge, r1, r11, r3}, false, al, "ge r1 r11 r3", "ge_r1_r11_r3"},
426      {{ge, r12, r3, r3}, false, al, "ge r12 r3 r3", "ge_r12_r3_r3"},
427      {{gt, r3, r8, r6}, false, al, "gt r3 r8 r6", "gt_r3_r8_r6"},
428      {{ne, r13, r2, r9}, false, al, "ne r13 r2 r9", "ne_r13_r2_r9"},
429      {{ls, r14, r9, r1}, false, al, "ls r14 r9 r1", "ls_r14_r9_r1"},
430      {{cc, r2, r10, r2}, false, al, "cc r2 r10 r2", "cc_r2_r10_r2"},
431      {{le, r9, r12, r1}, false, al, "le r9 r12 r1", "le_r9_r12_r1"},
432      {{cs, r11, r10, r0}, false, al, "cs r11 r10 r0", "cs_r11_r10_r0"},
433      {{eq, r7, r0, r5}, false, al, "eq r7 r0 r5", "eq_r7_r0_r5"},
434      {{ne, r10, r4, r4}, false, al, "ne r10 r4 r4", "ne_r10_r4_r4"},
435      {{pl, r13, r9, r6}, false, al, "pl r13 r9 r6", "pl_r13_r9_r6"},
436      {{vc, r11, r3, r3}, false, al, "vc r11 r3 r3", "vc_r11_r3_r3"},
437      {{al, r1, r13, r9}, false, al, "al r1 r13 r9", "al_r1_r13_r9"},
438      {{cc, r13, r9, r14}, false, al, "cc r13 r9 r14", "cc_r13_r9_r14"},
439      {{vc, r5, r2, r3}, false, al, "vc r5 r2 r3", "vc_r5_r2_r3"},
440      {{ne, r12, r8, r10}, false, al, "ne r12 r8 r10", "ne_r12_r8_r10"},
441      {{cs, r11, r13, r6}, false, al, "cs r11 r13 r6", "cs_r11_r13_r6"},
442      {{al, r1, r11, r10}, false, al, "al r1 r11 r10", "al_r1_r11_r10"},
443      {{ne, r14, r6, r11}, false, al, "ne r14 r6 r11", "ne_r14_r6_r11"},
444      {{cs, r1, r14, r5}, false, al, "cs r1 r14 r5", "cs_r1_r14_r5"},
445      {{al, r11, r11, r6}, false, al, "al r11 r11 r6", "al_r11_r11_r6"},
446      {{pl, r3, r6, r2}, false, al, "pl r3 r6 r2", "pl_r3_r6_r2"},
447      {{ne, r3, r9, r4}, false, al, "ne r3 r9 r4", "ne_r3_r9_r4"},
448      {{mi, r11, r4, r9}, false, al, "mi r11 r4 r9", "mi_r11_r4_r9"},
449      {{al, r10, r1, r3}, false, al, "al r10 r1 r3", "al_r10_r1_r3"},
450      {{vc, r2, r14, r11}, false, al, "vc r2 r14 r11", "vc_r2_r14_r11"},
451      {{mi, r9, r3, r0}, false, al, "mi r9 r3 r0", "mi_r9_r3_r0"},
452      {{vs, r9, r8, r1}, false, al, "vs r9 r8 r1", "vs_r9_r8_r1"},
453      {{lt, r2, r12, r5}, false, al, "lt r2 r12 r5", "lt_r2_r12_r5"},
454      {{al, r9, r8, r12}, false, al, "al r9 r8 r12", "al_r9_r8_r12"},
455      {{vc, r3, r8, r0}, false, al, "vc r3 r8 r0", "vc_r3_r8_r0"},
456      {{mi, r10, r5, r1}, false, al, "mi r10 r5 r1", "mi_r10_r5_r1"},
457      {{vc, r7, r14, r2}, false, al, "vc r7 r14 r2", "vc_r7_r14_r2"},
458      {{ls, r0, r9, r7}, false, al, "ls r0 r9 r7", "ls_r0_r9_r7"},
459      {{cs, r3, r0, r10}, false, al, "cs r3 r0 r10", "cs_r3_r0_r10"},
460      {{cc, r10, r8, r10}, false, al, "cc r10 r8 r10", "cc_r10_r8_r10"},
461      {{eq, r5, r4, r1}, false, al, "eq r5 r4 r1", "eq_r5_r4_r1"},
462      {{vc, r11, r13, r1}, false, al, "vc r11 r13 r1", "vc_r11_r13_r1"},
463      {{hi, r6, r5, r8}, false, al, "hi r6 r5 r8", "hi_r6_r5_r8"},
464      {{ne, r10, r5, r6}, false, al, "ne r10 r5 r6", "ne_r10_r5_r6"},
465      {{al, r10, r12, r9}, false, al, "al r10 r12 r9", "al_r10_r12_r9"},
466      {{eq, r5, r1, r12}, false, al, "eq r5 r1 r12", "eq_r5_r1_r12"},
467      {{le, r0, r14, r10}, false, al, "le r0 r14 r10", "le_r0_r14_r10"},
468      {{eq, r4, r2, r5}, false, al, "eq r4 r2 r5", "eq_r4_r2_r5"},
469      {{pl, r5, r8, r2}, false, al, "pl r5 r8 r2", "pl_r5_r8_r2"},
470      {{hi, r5, r14, r4}, false, al, "hi r5 r14 r4", "hi_r5_r14_r4"},
471      {{le, r2, r7, r9}, false, al, "le r2 r7 r9", "le_r2_r7_r9"},
472      {{pl, r5, r12, r6}, false, al, "pl r5 r12 r6", "pl_r5_r12_r6"},
473      {{vs, r11, r4, r14}, false, al, "vs r11 r4 r14", "vs_r11_r4_r14"},
474      {{eq, r0, r7, r14}, false, al, "eq r0 r7 r14", "eq_r0_r7_r14"},
475      {{pl, r5, r2, r5}, false, al, "pl r5 r2 r5", "pl_r5_r2_r5"},
476      {{ne, r5, r11, r7}, false, al, "ne r5 r11 r7", "ne_r5_r11_r7"},
477      {{pl, r7, r9, r10}, false, al, "pl r7 r9 r10", "pl_r7_r9_r10"},
478      {{hi, r4, r2, r2}, false, al, "hi r4 r2 r2", "hi_r4_r2_r2"},
479      {{pl, r14, r9, r2}, false, al, "pl r14 r9 r2", "pl_r14_r9_r2"},
480      {{le, r4, r11, r13}, false, al, "le r4 r11 r13", "le_r4_r11_r13"},
481      {{pl, r8, r8, r8}, false, al, "pl r8 r8 r8", "pl_r8_r8_r8"},
482      {{ge, r0, r6, r10}, false, al, "ge r0 r6 r10", "ge_r0_r6_r10"},
483      {{vc, r4, r4, r10}, false, al, "vc r4 r4 r10", "vc_r4_r4_r10"},
484      {{cc, r11, r9, r12}, false, al, "cc r11 r9 r12", "cc_r11_r9_r12"},
485      {{pl, r14, r4, r12}, false, al, "pl r14 r4 r12", "pl_r14_r4_r12"},
486      {{vs, r8, r8, r8}, false, al, "vs r8 r8 r8", "vs_r8_r8_r8"},
487      {{ge, r14, r2, r12}, false, al, "ge r14 r2 r12", "ge_r14_r2_r12"},
488      {{ge, r8, r2, r13}, false, al, "ge r8 r2 r13", "ge_r8_r2_r13"},
489      {{vs, r10, r0, r11}, false, al, "vs r10 r0 r11", "vs_r10_r0_r11"},
490      {{eq, r5, r1, r2}, false, al, "eq r5 r1 r2", "eq_r5_r1_r2"},
491      {{vs, r10, r11, r3}, false, al, "vs r10 r11 r3", "vs_r10_r11_r3"},
492      {{lt, r13, r13, r7}, false, al, "lt r13 r13 r7", "lt_r13_r13_r7"},
493      {{le, r12, r7, r6}, false, al, "le r12 r7 r6", "le_r12_r7_r6"},
494      {{eq, r4, r3, r3}, false, al, "eq r4 r3 r3", "eq_r4_r3_r3"},
495      {{pl, r0, r5, r8}, false, al, "pl r0 r5 r8", "pl_r0_r5_r8"},
496      {{vs, r10, r5, r3}, false, al, "vs r10 r5 r3", "vs_r10_r5_r3"},
497      {{gt, r0, r11, r9}, false, al, "gt r0 r11 r9", "gt_r0_r11_r9"},
498      {{cc, r8, r5, r9}, false, al, "cc r8 r5 r9", "cc_r8_r5_r9"},
499      {{cs, r9, r12, r11}, false, al, "cs r9 r12 r11", "cs_r9_r12_r11"},
500      {{gt, r3, r4, r8}, false, al, "gt r3 r4 r8", "gt_r3_r4_r8"},
501      {{ls, r8, r3, r10}, false, al, "ls r8 r3 r10", "ls_r8_r3_r10"},
502      {{eq, r8, r14, r12}, false, al, "eq r8 r14 r12", "eq_r8_r14_r12"},
503      {{gt, r7, r1, r3}, false, al, "gt r7 r1 r3", "gt_r7_r1_r3"},
504      {{al, r4, r4, r8}, false, al, "al r4 r4 r8", "al_r4_r4_r8"},
505      {{gt, r9, r14, r10}, false, al, "gt r9 r14 r10", "gt_r9_r14_r10"},
506      {{lt, r3, r13, r2}, false, al, "lt r3 r13 r2", "lt_r3_r13_r2"},
507      {{le, r4, r11, r14}, false, al, "le r4 r11 r14", "le_r4_r11_r14"},
508      {{ge, r2, r14, r0}, false, al, "ge r2 r14 r0", "ge_r2_r14_r0"},
509      {{pl, r1, r8, r8}, false, al, "pl r1 r8 r8", "pl_r1_r8_r8"},
510      {{pl, r9, r2, r5}, false, al, "pl r9 r2 r5", "pl_r9_r2_r5"},
511      {{vs, r13, r13, r1}, false, al, "vs r13 r13 r1", "vs_r13_r13_r1"},
512      {{ge, r12, r14, r3}, false, al, "ge r12 r14 r3", "ge_r12_r14_r3"},
513      {{vc, r0, r11, r4}, false, al, "vc r0 r11 r4", "vc_r0_r11_r4"},
514      {{ge, r0, r2, r9}, false, al, "ge r0 r2 r9", "ge_r0_r2_r9"},
515      {{vc, r12, r1, r6}, false, al, "vc r12 r1 r6", "vc_r12_r1_r6"},
516      {{ne, r1, r3, r7}, false, al, "ne r1 r3 r7", "ne_r1_r3_r7"},
517      {{vs, r10, r3, r9}, false, al, "vs r10 r3 r9", "vs_r10_r3_r9"},
518      {{cc, r14, r4, r1}, false, al, "cc r14 r4 r1", "cc_r14_r4_r1"},
519      {{le, r9, r3, r7}, false, al, "le r9 r3 r7", "le_r9_r3_r7"},
520      {{le, r1, r0, r14}, false, al, "le r1 r0 r14", "le_r1_r0_r14"},
521      {{le, r0, r14, r4}, false, al, "le r0 r14 r4", "le_r0_r14_r4"},
522      {{hi, r13, r8, r11}, false, al, "hi r13 r8 r11", "hi_r13_r8_r11"},
523      {{cc, r10, r6, r11}, false, al, "cc r10 r6 r11", "cc_r10_r6_r11"},
524      {{cc, r0, r10, r14}, false, al, "cc r0 r10 r14", "cc_r0_r10_r14"},
525      {{le, r4, r4, r0}, false, al, "le r4 r4 r0", "le_r4_r4_r0"},
526      {{pl, r8, r14, r12}, false, al, "pl r8 r14 r12", "pl_r8_r14_r12"},
527      {{ge, r13, r12, r2}, false, al, "ge r13 r12 r2", "ge_r13_r12_r2"},
528      {{al, r11, r11, r7}, false, al, "al r11 r11 r7", "al_r11_r11_r7"},
529      {{ls, r11, r12, r1}, false, al, "ls r11 r12 r1", "ls_r11_r12_r1"},
530      {{vs, r10, r14, r14}, false, al, "vs r10 r14 r14", "vs_r10_r14_r14"},
531      {{pl, r2, r8, r12}, false, al, "pl r2 r8 r12", "pl_r2_r8_r12"},
532      {{pl, r12, r7, r11}, false, al, "pl r12 r7 r11", "pl_r12_r7_r11"},
533      {{eq, r5, r8, r13}, false, al, "eq r5 r8 r13", "eq_r5_r8_r13"},
534      {{vc, r6, r6, r6}, false, al, "vc r6 r6 r6", "vc_r6_r6_r6"},
535      {{vs, r0, r12, r1}, false, al, "vs r0 r12 r1", "vs_r0_r12_r1"},
536      {{cs, r6, r0, r8}, false, al, "cs r6 r0 r8", "cs_r6_r0_r8"},
537      {{cc, r3, r4, r1}, false, al, "cc r3 r4 r1", "cc_r3_r4_r1"},
538      {{lt, r1, r10, r14}, false, al, "lt r1 r10 r14", "lt_r1_r10_r14"},
539      {{le, r1, r3, r5}, false, al, "le r1 r3 r5", "le_r1_r3_r5"},
540      {{cc, r11, r1, r1}, false, al, "cc r11 r1 r1", "cc_r11_r1_r1"},
541      {{vc, r1, r8, r7}, false, al, "vc r1 r8 r7", "vc_r1_r8_r7"},
542      {{eq, r3, r10, r13}, false, al, "eq r3 r10 r13", "eq_r3_r10_r13"},
543      {{hi, r14, r12, r12}, false, al, "hi r14 r12 r12", "hi_r14_r12_r12"},
544      {{eq, r10, r1, r14}, false, al, "eq r10 r1 r14", "eq_r10_r1_r14"},
545      {{lt, r3, r1, r6}, false, al, "lt r3 r1 r6", "lt_r3_r1_r6"},
546      {{cc, r9, r12, r10}, false, al, "cc r9 r12 r10", "cc_r9_r12_r10"},
547      {{lt, r13, r14, r14}, false, al, "lt r13 r14 r14", "lt_r13_r14_r14"},
548      {{ge, r2, r6, r9}, false, al, "ge r2 r6 r9", "ge_r2_r6_r9"},
549      {{vs, r3, r9, r1}, false, al, "vs r3 r9 r1", "vs_r3_r9_r1"},
550      {{cc, r1, r9, r12}, false, al, "cc r1 r9 r12", "cc_r1_r9_r12"},
551      {{ls, r5, r0, r6}, false, al, "ls r5 r0 r6", "ls_r5_r0_r6"},
552      {{hi, r6, r14, r10}, false, al, "hi r6 r14 r10", "hi_r6_r14_r10"},
553      {{al, r11, r10, r3}, false, al, "al r11 r10 r3", "al_r11_r10_r3"},
554      {{ne, r13, r4, r1}, false, al, "ne r13 r4 r1", "ne_r13_r4_r1"},
555      {{hi, r13, r5, r14}, false, al, "hi r13 r5 r14", "hi_r13_r5_r14"},
556      {{ne, r8, r9, r11}, false, al, "ne r8 r9 r11", "ne_r8_r9_r11"},
557      {{eq, r0, r13, r13}, false, al, "eq r0 r13 r13", "eq_r0_r13_r13"},
558      {{ne, r14, r11, r0}, false, al, "ne r14 r11 r0", "ne_r14_r11_r0"},
559      {{mi, r6, r8, r7}, false, al, "mi r6 r8 r7", "mi_r6_r8_r7"},
560      {{eq, r1, r7, r5}, false, al, "eq r1 r7 r5", "eq_r1_r7_r5"},
561      {{pl, r12, r9, r12}, false, al, "pl r12 r9 r12", "pl_r12_r9_r12"},
562      {{al, r4, r5, r14}, false, al, "al r4 r5 r14", "al_r4_r5_r14"},
563      {{pl, r7, r0, r12}, false, al, "pl r7 r0 r12", "pl_r7_r0_r12"},
564      {{mi, r5, r0, r13}, false, al, "mi r5 r0 r13", "mi_r5_r0_r13"},
565      {{al, r10, r7, r11}, false, al, "al r10 r7 r11", "al_r10_r7_r11"},
566      {{gt, r2, r10, r0}, false, al, "gt r2 r10 r0", "gt_r2_r10_r0"},
567      {{ge, r11, r11, r8}, false, al, "ge r11 r11 r8", "ge_r11_r11_r8"},
568      {{eq, r14, r7, r3}, false, al, "eq r14 r7 r3", "eq_r14_r7_r3"},
569      {{ls, r0, r12, r4}, false, al, "ls r0 r12 r4", "ls_r0_r12_r4"},
570      {{ne, r10, r1, r7}, false, al, "ne r10 r1 r7", "ne_r10_r1_r7"},
571      {{hi, r14, r3, r13}, false, al, "hi r14 r3 r13", "hi_r14_r3_r13"},
572      {{le, r1, r5, r12}, false, al, "le r1 r5 r12", "le_r1_r5_r12"},
573      {{ne, r8, r5, r11}, false, al, "ne r8 r5 r11", "ne_r8_r5_r11"},
574      {{le, r5, r13, r0}, false, al, "le r5 r13 r0", "le_r5_r13_r0"},
575      {{gt, r8, r12, r7}, false, al, "gt r8 r12 r7", "gt_r8_r12_r7"},
576      {{eq, r9, r14, r3}, false, al, "eq r9 r14 r3", "eq_r9_r14_r3"},
577      {{cs, r10, r9, r9}, false, al, "cs r10 r9 r9", "cs_r10_r9_r9"},
578      {{vc, r5, r13, r8}, false, al, "vc r5 r13 r8", "vc_r5_r13_r8"},
579      {{eq, r4, r1, r8}, false, al, "eq r4 r1 r8", "eq_r4_r1_r8"},
580      {{lt, r12, r14, r9}, false, al, "lt r12 r14 r9", "lt_r12_r14_r9"},
581      {{cc, r8, r8, r0}, false, al, "cc r8 r8 r0", "cc_r8_r8_r0"},
582      {{hi, r0, r14, r12}, false, al, "hi r0 r14 r12", "hi_r0_r14_r12"},
583      {{hi, r4, r1, r10}, false, al, "hi r4 r1 r10", "hi_r4_r1_r10"},
584      {{gt, r2, r14, r12}, false, al, "gt r2 r14 r12", "gt_r2_r14_r12"},
585      {{vs, r1, r8, r14}, false, al, "vs r1 r8 r14", "vs_r1_r8_r14"},
586      {{cs, r4, r1, r6}, false, al, "cs r4 r1 r6", "cs_r4_r1_r6"},
587      {{hi, r7, r8, r7}, false, al, "hi r7 r8 r7", "hi_r7_r8_r7"},
588      {{hi, r3, r11, r8}, false, al, "hi r3 r11 r8", "hi_r3_r11_r8"},
589      {{lt, r1, r12, r9}, false, al, "lt r1 r12 r9", "lt_r1_r12_r9"},
590      {{cs, r13, r4, r12}, false, al, "cs r13 r4 r12", "cs_r13_r4_r12"},
591      {{eq, r10, r10, r5}, false, al, "eq r10 r10 r5", "eq_r10_r10_r5"},
592      {{ge, r10, r14, r0}, false, al, "ge r10 r14 r0", "ge_r10_r14_r0"},
593      {{lt, r3, r3, r2}, false, al, "lt r3 r3 r2", "lt_r3_r3_r2"},
594      {{vs, r2, r13, r2}, false, al, "vs r2 r13 r2", "vs_r2_r13_r2"},
595      {{ls, r6, r2, r12}, false, al, "ls r6 r2 r12", "ls_r6_r2_r12"},
596      {{gt, r5, r11, r12}, false, al, "gt r5 r11 r12", "gt_r5_r11_r12"},
597      {{al, r11, r10, r6}, false, al, "al r11 r10 r6", "al_r11_r10_r6"},
598      {{hi, r12, r14, r14}, false, al, "hi r12 r14 r14", "hi_r12_r14_r14"},
599      {{ge, r12, r10, r6}, false, al, "ge r12 r10 r6", "ge_r12_r10_r6"},
600      {{eq, r8, r3, r9}, false, al, "eq r8 r3 r9", "eq_r8_r3_r9"},
601      {{cc, r7, r5, r1}, false, al, "cc r7 r5 r1", "cc_r7_r5_r1"},
602      {{lt, r3, r0, r6}, false, al, "lt r3 r0 r6", "lt_r3_r0_r6"},
603      {{le, r14, r4, r12}, false, al, "le r14 r4 r12", "le_r14_r4_r12"},
604      {{le, r9, r6, r4}, false, al, "le r9 r6 r4", "le_r9_r6_r4"},
605      {{hi, r6, r11, r0}, false, al, "hi r6 r11 r0", "hi_r6_r11_r0"},
606      {{al, r3, r7, r6}, false, al, "al r3 r7 r6", "al_r3_r7_r6"},
607      {{lt, r10, r9, r12}, false, al, "lt r10 r9 r12", "lt_r10_r9_r12"},
608      {{al, r14, r8, r4}, false, al, "al r14 r8 r4", "al_r14_r8_r4"},
609      {{le, r14, r11, r14}, false, al, "le r14 r11 r14", "le_r14_r11_r14"},
610      {{al, r14, r13, r8}, false, al, "al r14 r13 r8", "al_r14_r13_r8"},
611      {{ge, r5, r9, r10}, false, al, "ge r5 r9 r10", "ge_r5_r9_r10"},
612      {{eq, r1, r9, r4}, false, al, "eq r1 r9 r4", "eq_r1_r9_r4"},
613      {{cc, r5, r13, r8}, false, al, "cc r5 r13 r8", "cc_r5_r13_r8"},
614      {{ne, r10, r0, r14}, false, al, "ne r10 r0 r14", "ne_r10_r0_r14"},
615      {{al, r2, r0, r10}, false, al, "al r2 r0 r10", "al_r2_r0_r10"},
616      {{pl, r4, r0, r11}, false, al, "pl r4 r0 r11", "pl_r4_r0_r11"},
617      {{gt, r13, r5, r12}, false, al, "gt r13 r5 r12", "gt_r13_r5_r12"},
618      {{al, r2, r13, r8}, false, al, "al r2 r13 r8", "al_r2_r13_r8"},
619      {{mi, r11, r3, r4}, false, al, "mi r11 r3 r4", "mi_r11_r3_r4"},
620      {{le, r11, r8, r1}, false, al, "le r11 r8 r1", "le_r11_r8_r1"},
621      {{hi, r12, r11, r1}, false, al, "hi r12 r11 r1", "hi_r12_r11_r1"},
622      {{ls, r6, r7, r2}, false, al, "ls r6 r7 r2", "ls_r6_r7_r2"},
623      {{cs, r7, r11, r2}, false, al, "cs r7 r11 r2", "cs_r7_r11_r2"},
624      {{vc, r11, r13, r7}, false, al, "vc r11 r13 r7", "vc_r11_r13_r7"},
625      {{cs, r13, r0, r1}, false, al, "cs r13 r0 r1", "cs_r13_r0_r1"},
626      {{cc, r5, r4, r6}, false, al, "cc r5 r4 r6", "cc_r5_r4_r6"},
627      {{gt, r4, r4, r13}, false, al, "gt r4 r4 r13", "gt_r4_r4_r13"},
628      {{al, r14, r8, r2}, false, al, "al r14 r8 r2", "al_r14_r8_r2"}};
629 
630 // These headers each contain an array of `TestResult` with the reference output
631 // values. The reference arrays are names `kReference{mnemonic}`.
632 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-adc.h"
633 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-adcs.h"
634 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-add.h"
635 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-adds.h"
636 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-and.h"
637 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-ands.h"
638 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-bic.h"
639 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-bics.h"
640 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-eor.h"
641 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-eors.h"
642 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-orr.h"
643 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-orrs.h"
644 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-rsb.h"
645 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-rsbs.h"
646 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-rsc.h"
647 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-rscs.h"
648 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sbc.h"
649 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sbcs.h"
650 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sub.h"
651 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-subs.h"
652 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sxtab.h"
653 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sxtab16.h"
654 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-sxtah.h"
655 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-uxtab.h"
656 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-uxtab16.h"
657 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-uxtah.h"
658 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-asr.h"
659 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-asrs.h"
660 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-lsl.h"
661 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-lsls.h"
662 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-lsr.h"
663 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-lsrs.h"
664 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-ror.h"
665 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-a32-rors.h"
666 
667 
668 // The maximum number of errors to report in detail for each test.
669 const unsigned kErrorReportLimit = 8;
670 
671 typedef void (MacroAssembler::*Fn)(Condition cond,
672                                    Register rd,
673                                    Register rn,
674                                    const Operand& op);
675 
TestHelper(Fn instruction,const char * mnemonic,const TestResult reference[])676 void TestHelper(Fn instruction,
677                 const char* mnemonic,
678                 const TestResult reference[]) {
679   unsigned total_error_count = 0;
680   MacroAssembler masm(BUF_SIZE);
681 
682   masm.UseA32();
683 
684   for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
685     // Values to pass to the macro-assembler.
686     Condition cond = kTests[i].operands.cond;
687     Register rd = kTests[i].operands.rd;
688     Register rn = kTests[i].operands.rn;
689     Register rm = kTests[i].operands.rm;
690     Operand op(rm);
691 
692     int32_t start = masm.GetCursorOffset();
693     {
694       // We never generate more that 4 bytes, as IT instructions are only
695       // allowed for narrow encodings.
696       ExactAssemblyScope scope(&masm, 4, ExactAssemblyScope::kMaximumSize);
697       if (kTests[i].in_it_block) {
698         masm.it(kTests[i].it_condition);
699       }
700       (masm.*instruction)(cond, rd, rn, op);
701     }
702     int32_t end = masm.GetCursorOffset();
703 
704     const byte* result_ptr =
705         masm.GetBuffer()->GetOffsetAddress<const byte*>(start);
706     VIXL_ASSERT(start < end);
707     uint32_t result_size = end - start;
708 
709     if (Test::generate_test_trace()) {
710       // Print the result bytes.
711       printf("const byte kInstruction_%s_%s[] = {\n",
712              mnemonic,
713              kTests[i].identifier);
714       for (uint32_t j = 0; j < result_size; j++) {
715         if (j == 0) {
716           printf("  0x%02" PRIx8, result_ptr[j]);
717         } else {
718           printf(", 0x%02" PRIx8, result_ptr[j]);
719         }
720       }
721       // This comment is meant to be used by external tools to validate
722       // the encoding. We can parse the comment to figure out what
723       // instruction this corresponds to.
724       if (kTests[i].in_it_block) {
725         printf(" // It %s; %s %s\n};\n",
726                kTests[i].it_condition.GetName(),
727                mnemonic,
728                kTests[i].operands_description);
729       } else {
730         printf(" // %s %s\n};\n", mnemonic, kTests[i].operands_description);
731       }
732     } else {
733       // Check we've emitted the exact same encoding as present in the
734       // trace file. Only print up to `kErrorReportLimit` errors.
735       if (((result_size != reference[i].size) ||
736            (memcmp(result_ptr, reference[i].encoding, reference[i].size) !=
737             0)) &&
738           (++total_error_count <= kErrorReportLimit)) {
739         printf("Error when testing \"%s\" with operands \"%s\":\n",
740                mnemonic,
741                kTests[i].operands_description);
742         printf("  Expected: ");
743         for (uint32_t j = 0; j < reference[i].size; j++) {
744           if (j == 0) {
745             printf("0x%02" PRIx8, reference[i].encoding[j]);
746           } else {
747             printf(", 0x%02" PRIx8, reference[i].encoding[j]);
748           }
749         }
750         printf("\n");
751         printf("  Found:    ");
752         for (uint32_t j = 0; j < result_size; j++) {
753           if (j == 0) {
754             printf("0x%02" PRIx8, result_ptr[j]);
755           } else {
756             printf(", 0x%02" PRIx8, result_ptr[j]);
757           }
758         }
759         printf("\n");
760       }
761     }
762   }
763 
764   masm.FinalizeCode();
765 
766   if (Test::generate_test_trace()) {
767     // Finalize the trace file by writing the final `TestResult` array
768     // which links all generated instruction encodings.
769     printf("const TestResult kReference%s[] = {\n", mnemonic);
770     for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
771       printf("  {\n");
772       printf("    ARRAY_SIZE(kInstruction_%s_%s),\n",
773              mnemonic,
774              kTests[i].identifier);
775       printf("    kInstruction_%s_%s,\n", mnemonic, kTests[i].identifier);
776       printf("  },\n");
777     }
778     printf("};\n");
779   } else {
780     if (total_error_count > kErrorReportLimit) {
781       printf("%u other errors follow.\n",
782              total_error_count - kErrorReportLimit);
783     }
784     // Crash if the test failed.
785     VIXL_CHECK(total_error_count == 0);
786   }
787 }
788 
789 // Instantiate tests for each instruction in the list.
790 #define TEST(mnemonic)                                                      \
791   void Test_##mnemonic() {                                                  \
792     TestHelper(&MacroAssembler::mnemonic, #mnemonic, kReference##mnemonic); \
793   }                                                                         \
794   Test test_##mnemonic(                                                     \
795       "AARCH32_ASSEMBLER_COND_RD_RN_OPERAND_RM_A32_" #mnemonic,             \
796       &Test_##mnemonic);
797 FOREACH_INSTRUCTION(TEST)
798 #undef TEST
799 
800 }  // namespace
801 #endif
802 
803 }  // namespace aarch32
804 }  // namespace vixl
805