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(orn) \
63 M(orns) \
64 M(orr) \
65 M(orrs) \
66 M(rsb) \
67 M(rsbs) \
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_T32
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 {{{al, r12, r9, r11}, false, al, "al r12 r9 r11", "al_r12_r9_r11"},
130 {{al, r3, r4, r10}, false, al, "al r3 r4 r10", "al_r3_r4_r10"},
131 {{al, r2, r0, r12}, false, al, "al r2 r0 r12", "al_r2_r0_r12"},
132 {{al, r9, r9, r13}, false, al, "al r9 r9 r13", "al_r9_r9_r13"},
133 {{al, r11, r2, r4}, false, al, "al r11 r2 r4", "al_r11_r2_r4"},
134 {{al, r7, r3, r7}, false, al, "al r7 r3 r7", "al_r7_r3_r7"},
135 {{al, r11, r6, r9}, false, al, "al r11 r6 r9", "al_r11_r6_r9"},
136 {{al, r8, r7, r11}, false, al, "al r8 r7 r11", "al_r8_r7_r11"},
137 {{al, r14, r12, r14}, false, al, "al r14 r12 r14", "al_r14_r12_r14"},
138 {{al, r8, r5, r8}, false, al, "al r8 r5 r8", "al_r8_r5_r8"},
139 {{al, r4, r4, r2}, false, al, "al r4 r4 r2", "al_r4_r4_r2"},
140 {{al, r10, r6, r7}, false, al, "al r10 r6 r7", "al_r10_r6_r7"},
141 {{al, r9, r13, r7}, false, al, "al r9 r13 r7", "al_r9_r13_r7"},
142 {{al, r6, r8, r5}, false, al, "al r6 r8 r5", "al_r6_r8_r5"},
143 {{al, r5, r10, r6}, false, al, "al r5 r10 r6", "al_r5_r10_r6"},
144 {{al, r14, r7, r11}, false, al, "al r14 r7 r11", "al_r14_r7_r11"},
145 {{al, r11, r4, r14}, false, al, "al r11 r4 r14", "al_r11_r4_r14"},
146 {{al, r5, r6, r4}, false, al, "al r5 r6 r4", "al_r5_r6_r4"},
147 {{al, r4, r9, r0}, false, al, "al r4 r9 r0", "al_r4_r9_r0"},
148 {{al, r5, r0, r8}, false, al, "al r5 r0 r8", "al_r5_r0_r8"},
149 {{al, r6, r2, r10}, false, al, "al r6 r2 r10", "al_r6_r2_r10"},
150 {{al, r0, r11, r14}, false, al, "al r0 r11 r14", "al_r0_r11_r14"},
151 {{al, r3, r10, r1}, false, al, "al r3 r10 r1", "al_r3_r10_r1"},
152 {{al, r13, r7, r8}, false, al, "al r13 r7 r8", "al_r13_r7_r8"},
153 {{al, r12, r5, r2}, false, al, "al r12 r5 r2", "al_r12_r5_r2"},
154 {{al, r7, r14, r7}, false, al, "al r7 r14 r7", "al_r7_r14_r7"},
155 {{al, r6, r6, r10}, false, al, "al r6 r6 r10", "al_r6_r6_r10"},
156 {{al, r2, r0, r2}, false, al, "al r2 r0 r2", "al_r2_r0_r2"},
157 {{al, r8, r14, r11}, false, al, "al r8 r14 r11", "al_r8_r14_r11"},
158 {{al, r10, r14, r2}, false, al, "al r10 r14 r2", "al_r10_r14_r2"},
159 {{al, r14, r11, r6}, false, al, "al r14 r11 r6", "al_r14_r11_r6"},
160 {{al, r9, r2, r11}, false, al, "al r9 r2 r11", "al_r9_r2_r11"},
161 {{al, r9, r9, r10}, false, al, "al r9 r9 r10", "al_r9_r9_r10"},
162 {{al, r11, r9, r13}, false, al, "al r11 r9 r13", "al_r11_r9_r13"},
163 {{al, r14, r12, r7}, false, al, "al r14 r12 r7", "al_r14_r12_r7"},
164 {{al, r9, r4, r7}, false, al, "al r9 r4 r7", "al_r9_r4_r7"},
165 {{al, r0, r7, r8}, false, al, "al r0 r7 r8", "al_r0_r7_r8"},
166 {{al, r12, r4, r4}, false, al, "al r12 r4 r4", "al_r12_r4_r4"},
167 {{al, r7, r9, r7}, false, al, "al r7 r9 r7", "al_r7_r9_r7"},
168 {{al, r1, r13, r13}, false, al, "al r1 r13 r13", "al_r1_r13_r13"},
169 {{al, r13, r11, r11}, false, al, "al r13 r11 r11", "al_r13_r11_r11"},
170 {{al, r0, r0, r7}, false, al, "al r0 r0 r7", "al_r0_r0_r7"},
171 {{al, r2, r12, r1}, false, al, "al r2 r12 r1", "al_r2_r12_r1"},
172 {{al, r8, r2, r5}, false, al, "al r8 r2 r5", "al_r8_r2_r5"},
173 {{al, r6, r0, r1}, false, al, "al r6 r0 r1", "al_r6_r0_r1"},
174 {{al, r9, r13, r0}, false, al, "al r9 r13 r0", "al_r9_r13_r0"},
175 {{al, r12, r5, r1}, false, al, "al r12 r5 r1", "al_r12_r5_r1"},
176 {{al, r14, r3, r4}, false, al, "al r14 r3 r4", "al_r14_r3_r4"},
177 {{al, r5, r9, r2}, false, al, "al r5 r9 r2", "al_r5_r9_r2"},
178 {{al, r8, r9, r10}, false, al, "al r8 r9 r10", "al_r8_r9_r10"},
179 {{al, r0, r11, r12}, false, al, "al r0 r11 r12", "al_r0_r11_r12"},
180 {{al, r2, r8, r4}, false, al, "al r2 r8 r4", "al_r2_r8_r4"},
181 {{al, r13, r6, r9}, false, al, "al r13 r6 r9", "al_r13_r6_r9"},
182 {{al, r2, r12, r9}, false, al, "al r2 r12 r9", "al_r2_r12_r9"},
183 {{al, r12, r0, r3}, false, al, "al r12 r0 r3", "al_r12_r0_r3"},
184 {{al, r13, r1, r1}, false, al, "al r13 r1 r1", "al_r13_r1_r1"},
185 {{al, r14, r6, r7}, false, al, "al r14 r6 r7", "al_r14_r6_r7"},
186 {{al, r8, r6, r6}, false, al, "al r8 r6 r6", "al_r8_r6_r6"},
187 {{al, r14, r9, r11}, false, al, "al r14 r9 r11", "al_r14_r9_r11"},
188 {{al, r6, r3, r3}, false, al, "al r6 r3 r3", "al_r6_r3_r3"},
189 {{al, r6, r8, r14}, false, al, "al r6 r8 r14", "al_r6_r8_r14"},
190 {{al, r8, r3, r6}, false, al, "al r8 r3 r6", "al_r8_r3_r6"},
191 {{al, r12, r6, r11}, false, al, "al r12 r6 r11", "al_r12_r6_r11"},
192 {{al, r5, r8, r14}, false, al, "al r5 r8 r14", "al_r5_r8_r14"},
193 {{al, r4, r10, r8}, false, al, "al r4 r10 r8", "al_r4_r10_r8"},
194 {{al, r4, r12, r14}, false, al, "al r4 r12 r14", "al_r4_r12_r14"},
195 {{al, r14, r8, r10}, false, al, "al r14 r8 r10", "al_r14_r8_r10"},
196 {{al, r2, r10, r8}, false, al, "al r2 r10 r8", "al_r2_r10_r8"},
197 {{al, r0, r14, r7}, false, al, "al r0 r14 r7", "al_r0_r14_r7"},
198 {{al, r9, r13, r9}, false, al, "al r9 r13 r9", "al_r9_r13_r9"},
199 {{al, r7, r0, r14}, false, al, "al r7 r0 r14", "al_r7_r0_r14"},
200 {{al, r14, r4, r9}, false, al, "al r14 r4 r9", "al_r14_r4_r9"},
201 {{al, r1, r1, r11}, false, al, "al r1 r1 r11", "al_r1_r1_r11"},
202 {{al, r11, r6, r1}, false, al, "al r11 r6 r1", "al_r11_r6_r1"},
203 {{al, r2, r8, r2}, false, al, "al r2 r8 r2", "al_r2_r8_r2"},
204 {{al, r1, r8, r4}, false, al, "al r1 r8 r4", "al_r1_r8_r4"},
205 {{al, r2, r3, r3}, false, al, "al r2 r3 r3", "al_r2_r3_r3"},
206 {{al, r4, r8, r8}, false, al, "al r4 r8 r8", "al_r4_r8_r8"},
207 {{al, r6, r4, r1}, false, al, "al r6 r4 r1", "al_r6_r4_r1"},
208 {{al, r1, r10, r3}, false, al, "al r1 r10 r3", "al_r1_r10_r3"},
209 {{al, r11, r14, r8}, false, al, "al r11 r14 r8", "al_r11_r14_r8"},
210 {{al, r1, r6, r3}, false, al, "al r1 r6 r3", "al_r1_r6_r3"},
211 {{al, r3, r13, r10}, false, al, "al r3 r13 r10", "al_r3_r13_r10"},
212 {{al, r6, r13, r8}, false, al, "al r6 r13 r8", "al_r6_r13_r8"},
213 {{al, r12, r3, r13}, false, al, "al r12 r3 r13", "al_r12_r3_r13"},
214 {{al, r8, r2, r4}, false, al, "al r8 r2 r4", "al_r8_r2_r4"},
215 {{al, r10, r1, r7}, false, al, "al r10 r1 r7", "al_r10_r1_r7"},
216 {{al, r11, r7, r12}, false, al, "al r11 r7 r12", "al_r11_r7_r12"},
217 {{al, r4, r4, r7}, false, al, "al r4 r4 r7", "al_r4_r4_r7"},
218 {{al, r1, r7, r9}, false, al, "al r1 r7 r9", "al_r1_r7_r9"},
219 {{al, r14, r3, r0}, false, al, "al r14 r3 r0", "al_r14_r3_r0"},
220 {{al, r10, r4, r7}, false, al, "al r10 r4 r7", "al_r10_r4_r7"},
221 {{al, r4, r9, r11}, false, al, "al r4 r9 r11", "al_r4_r9_r11"},
222 {{al, r2, r2, r0}, false, al, "al r2 r2 r0", "al_r2_r2_r0"},
223 {{al, r1, r6, r12}, false, al, "al r1 r6 r12", "al_r1_r6_r12"},
224 {{al, r0, r5, r6}, false, al, "al r0 r5 r6", "al_r0_r5_r6"},
225 {{al, r8, r11, r10}, false, al, "al r8 r11 r10", "al_r8_r11_r10"},
226 {{al, r10, r4, r3}, false, al, "al r10 r4 r3", "al_r10_r4_r3"},
227 {{al, r1, r0, r3}, false, al, "al r1 r0 r3", "al_r1_r0_r3"},
228 {{al, r11, r8, r6}, false, al, "al r11 r8 r6", "al_r11_r8_r6"},
229 {{al, r8, r9, r0}, false, al, "al r8 r9 r0", "al_r8_r9_r0"},
230 {{al, r5, r8, r7}, false, al, "al r5 r8 r7", "al_r5_r8_r7"},
231 {{al, r9, r4, r1}, false, al, "al r9 r4 r1", "al_r9_r4_r1"},
232 {{al, r1, r11, r12}, false, al, "al r1 r11 r12", "al_r1_r11_r12"},
233 {{al, r5, r5, r11}, false, al, "al r5 r5 r11", "al_r5_r5_r11"},
234 {{al, r4, r6, r13}, false, al, "al r4 r6 r13", "al_r4_r6_r13"},
235 {{al, r14, r1, r11}, false, al, "al r14 r1 r11", "al_r14_r1_r11"},
236 {{al, r11, r0, r12}, false, al, "al r11 r0 r12", "al_r11_r0_r12"},
237 {{al, r9, r2, r0}, false, al, "al r9 r2 r0", "al_r9_r2_r0"},
238 {{al, r11, r5, r10}, false, al, "al r11 r5 r10", "al_r11_r5_r10"},
239 {{al, r1, r11, r2}, false, al, "al r1 r11 r2", "al_r1_r11_r2"},
240 {{al, r14, r2, r9}, false, al, "al r14 r2 r9", "al_r14_r2_r9"},
241 {{al, r4, r10, r3}, false, al, "al r4 r10 r3", "al_r4_r10_r3"},
242 {{al, r1, r5, r11}, false, al, "al r1 r5 r11", "al_r1_r5_r11"},
243 {{al, r3, r10, r4}, false, al, "al r3 r10 r4", "al_r3_r10_r4"},
244 {{al, r1, r7, r10}, false, al, "al r1 r7 r10", "al_r1_r7_r10"},
245 {{al, r14, r8, r14}, false, al, "al r14 r8 r14", "al_r14_r8_r14"},
246 {{al, r12, r11, r4}, false, al, "al r12 r11 r4", "al_r12_r11_r4"},
247 {{al, r7, r9, r6}, false, al, "al r7 r9 r6", "al_r7_r9_r6"},
248 {{al, r8, r8, r9}, false, al, "al r8 r8 r9", "al_r8_r8_r9"},
249 {{al, r12, r5, r0}, false, al, "al r12 r5 r0", "al_r12_r5_r0"},
250 {{al, r6, r11, r12}, false, al, "al r6 r11 r12", "al_r6_r11_r12"},
251 {{al, r9, r5, r11}, false, al, "al r9 r5 r11", "al_r9_r5_r11"},
252 {{al, r6, r14, r6}, false, al, "al r6 r14 r6", "al_r6_r14_r6"},
253 {{al, r0, r3, r7}, false, al, "al r0 r3 r7", "al_r0_r3_r7"},
254 {{al, r9, r5, r10}, false, al, "al r9 r5 r10", "al_r9_r5_r10"},
255 {{al, r4, r1, r6}, false, al, "al r4 r1 r6", "al_r4_r1_r6"},
256 {{al, r6, r1, r13}, false, al, "al r6 r1 r13", "al_r6_r1_r13"},
257 {{al, r13, r1, r4}, false, al, "al r13 r1 r4", "al_r13_r1_r4"},
258 {{al, r10, r11, r9}, false, al, "al r10 r11 r9", "al_r10_r11_r9"},
259 {{al, r14, r13, r7}, false, al, "al r14 r13 r7", "al_r14_r13_r7"},
260 {{al, r5, r3, r13}, false, al, "al r5 r3 r13", "al_r5_r3_r13"},
261 {{al, r8, r9, r6}, false, al, "al r8 r9 r6", "al_r8_r9_r6"},
262 {{al, r9, r10, r5}, false, al, "al r9 r10 r5", "al_r9_r10_r5"},
263 {{al, r12, r11, r7}, false, al, "al r12 r11 r7", "al_r12_r11_r7"},
264 {{al, r5, r13, r12}, false, al, "al r5 r13 r12", "al_r5_r13_r12"},
265 {{al, r9, r13, r8}, false, al, "al r9 r13 r8", "al_r9_r13_r8"},
266 {{al, r5, r3, r9}, false, al, "al r5 r3 r9", "al_r5_r3_r9"},
267 {{al, r8, r5, r14}, false, al, "al r8 r5 r14", "al_r8_r5_r14"},
268 {{al, r8, r10, r10}, false, al, "al r8 r10 r10", "al_r8_r10_r10"},
269 {{al, r2, r6, r4}, false, al, "al r2 r6 r4", "al_r2_r6_r4"},
270 {{al, r10, r7, r1}, false, al, "al r10 r7 r1", "al_r10_r7_r1"},
271 {{al, r4, r0, r5}, false, al, "al r4 r0 r5", "al_r4_r0_r5"},
272 {{al, r7, r12, r9}, false, al, "al r7 r12 r9", "al_r7_r12_r9"},
273 {{al, r11, r11, r10}, false, al, "al r11 r11 r10", "al_r11_r11_r10"},
274 {{al, r3, r9, r13}, false, al, "al r3 r9 r13", "al_r3_r9_r13"},
275 {{al, r10, r4, r4}, false, al, "al r10 r4 r4", "al_r10_r4_r4"},
276 {{al, r13, r1, r11}, false, al, "al r13 r1 r11", "al_r13_r1_r11"},
277 {{al, r2, r13, r0}, false, al, "al r2 r13 r0", "al_r2_r13_r0"},
278 {{al, r11, r4, r1}, false, al, "al r11 r4 r1", "al_r11_r4_r1"},
279 {{al, r1, r3, r10}, false, al, "al r1 r3 r10", "al_r1_r3_r10"},
280 {{al, r4, r13, r2}, false, al, "al r4 r13 r2", "al_r4_r13_r2"},
281 {{al, r4, r8, r0}, false, al, "al r4 r8 r0", "al_r4_r8_r0"},
282 {{al, r9, r6, r1}, false, al, "al r9 r6 r1", "al_r9_r6_r1"},
283 {{al, r14, r14, r10}, false, al, "al r14 r14 r10", "al_r14_r14_r10"},
284 {{al, r9, r9, r2}, false, al, "al r9 r9 r2", "al_r9_r9_r2"},
285 {{al, r14, r3, r12}, false, al, "al r14 r3 r12", "al_r14_r3_r12"},
286 {{al, r9, r4, r0}, false, al, "al r9 r4 r0", "al_r9_r4_r0"},
287 {{al, r10, r10, r11}, false, al, "al r10 r10 r11", "al_r10_r10_r11"},
288 {{al, r0, r1, r13}, false, al, "al r0 r1 r13", "al_r0_r1_r13"},
289 {{al, r10, r8, r13}, false, al, "al r10 r8 r13", "al_r10_r8_r13"},
290 {{al, r8, r0, r2}, false, al, "al r8 r0 r2", "al_r8_r0_r2"},
291 {{al, r2, r0, r7}, false, al, "al r2 r0 r7", "al_r2_r0_r7"},
292 {{al, r11, r12, r10}, false, al, "al r11 r12 r10", "al_r11_r12_r10"},
293 {{al, r0, r5, r3}, false, al, "al r0 r5 r3", "al_r0_r5_r3"},
294 {{al, r3, r2, r0}, false, al, "al r3 r2 r0", "al_r3_r2_r0"},
295 {{al, r12, r10, r1}, false, al, "al r12 r10 r1", "al_r12_r10_r1"},
296 {{al, r3, r2, r14}, false, al, "al r3 r2 r14", "al_r3_r2_r14"},
297 {{al, r4, r12, r1}, false, al, "al r4 r12 r1", "al_r4_r12_r1"},
298 {{al, r14, r8, r3}, false, al, "al r14 r8 r3", "al_r14_r8_r3"},
299 {{al, r4, r14, r12}, false, al, "al r4 r14 r12", "al_r4_r14_r12"},
300 {{al, r3, r3, r4}, false, al, "al r3 r3 r4", "al_r3_r3_r4"},
301 {{al, r10, r13, r4}, false, al, "al r10 r13 r4", "al_r10_r13_r4"},
302 {{al, r9, r2, r12}, false, al, "al r9 r2 r12", "al_r9_r2_r12"},
303 {{al, r5, r13, r7}, false, al, "al r5 r13 r7", "al_r5_r13_r7"},
304 {{al, r13, r12, r9}, false, al, "al r13 r12 r9", "al_r13_r12_r9"},
305 {{al, r4, r4, r5}, false, al, "al r4 r4 r5", "al_r4_r4_r5"},
306 {{al, r1, r8, r12}, false, al, "al r1 r8 r12", "al_r1_r8_r12"},
307 {{al, r1, r8, r6}, false, al, "al r1 r8 r6", "al_r1_r8_r6"},
308 {{al, r14, r11, r4}, false, al, "al r14 r11 r4", "al_r14_r11_r4"},
309 {{al, r14, r9, r3}, false, al, "al r14 r9 r3", "al_r14_r9_r3"},
310 {{al, r11, r5, r9}, false, al, "al r11 r5 r9", "al_r11_r5_r9"},
311 {{al, r3, r10, r10}, false, al, "al r3 r10 r10", "al_r3_r10_r10"},
312 {{al, r6, r13, r14}, false, al, "al r6 r13 r14", "al_r6_r13_r14"},
313 {{al, r1, r8, r14}, false, al, "al r1 r8 r14", "al_r1_r8_r14"},
314 {{al, r10, r1, r10}, false, al, "al r10 r1 r10", "al_r10_r1_r10"},
315 {{al, r8, r1, r1}, false, al, "al r8 r1 r1", "al_r8_r1_r1"},
316 {{al, r10, r10, r4}, false, al, "al r10 r10 r4", "al_r10_r10_r4"},
317 {{al, r9, r11, r13}, false, al, "al r9 r11 r13", "al_r9_r11_r13"},
318 {{al, r14, r8, r8}, false, al, "al r14 r8 r8", "al_r14_r8_r8"},
319 {{al, r13, r4, r10}, false, al, "al r13 r4 r10", "al_r13_r4_r10"},
320 {{al, r14, r3, r1}, false, al, "al r14 r3 r1", "al_r14_r3_r1"},
321 {{al, r5, r11, r14}, false, al, "al r5 r11 r14", "al_r5_r11_r14"},
322 {{al, r2, r6, r6}, false, al, "al r2 r6 r6", "al_r2_r6_r6"},
323 {{al, r14, r1, r14}, false, al, "al r14 r1 r14", "al_r14_r1_r14"},
324 {{al, r5, r10, r0}, false, al, "al r5 r10 r0", "al_r5_r10_r0"},
325 {{al, r11, r2, r5}, false, al, "al r11 r2 r5", "al_r11_r2_r5"},
326 {{al, r4, r9, r1}, false, al, "al r4 r9 r1", "al_r4_r9_r1"},
327 {{al, r12, r7, r2}, false, al, "al r12 r7 r2", "al_r12_r7_r2"},
328 {{al, r10, r12, r9}, false, al, "al r10 r12 r9", "al_r10_r12_r9"},
329 {{al, r2, r3, r12}, false, al, "al r2 r3 r12", "al_r2_r3_r12"},
330 {{al, r7, r6, r3}, false, al, "al r7 r6 r3", "al_r7_r6_r3"},
331 {{al, r11, r11, r8}, false, al, "al r11 r11 r8", "al_r11_r11_r8"},
332 {{al, r6, r14, r10}, false, al, "al r6 r14 r10", "al_r6_r14_r10"},
333 {{al, r13, r2, r4}, false, al, "al r13 r2 r4", "al_r13_r2_r4"},
334 {{al, r5, r5, r4}, false, al, "al r5 r5 r4", "al_r5_r5_r4"},
335 {{al, r9, r1, r2}, false, al, "al r9 r1 r2", "al_r9_r1_r2"},
336 {{al, r3, r10, r14}, false, al, "al r3 r10 r14", "al_r3_r10_r14"},
337 {{al, r1, r9, r0}, false, al, "al r1 r9 r0", "al_r1_r9_r0"},
338 {{al, r4, r10, r12}, false, al, "al r4 r10 r12", "al_r4_r10_r12"},
339 {{al, r8, r9, r2}, false, al, "al r8 r9 r2", "al_r8_r9_r2"},
340 {{al, r0, r14, r0}, false, al, "al r0 r14 r0", "al_r0_r14_r0"},
341 {{al, r14, r11, r11}, false, al, "al r14 r11 r11", "al_r14_r11_r11"},
342 {{al, r9, r12, r5}, false, al, "al r9 r12 r5", "al_r9_r12_r5"},
343 {{al, r11, r8, r3}, false, al, "al r11 r8 r3", "al_r11_r8_r3"},
344 {{al, r13, r11, r8}, false, al, "al r13 r11 r8", "al_r13_r11_r8"},
345 {{al, r4, r13, r12}, false, al, "al r4 r13 r12", "al_r4_r13_r12"},
346 {{al, r10, r13, r6}, false, al, "al r10 r13 r6", "al_r10_r13_r6"},
347 {{al, r14, r7, r13}, false, al, "al r14 r7 r13", "al_r14_r7_r13"},
348 {{al, r10, r2, r12}, false, al, "al r10 r2 r12", "al_r10_r2_r12"},
349 {{al, r6, r9, r4}, false, al, "al r6 r9 r4", "al_r6_r9_r4"},
350 {{al, r9, r8, r2}, false, al, "al r9 r8 r2", "al_r9_r8_r2"},
351 {{al, r14, r5, r5}, false, al, "al r14 r5 r5", "al_r14_r5_r5"},
352 {{al, r11, r14, r4}, false, al, "al r11 r14 r4", "al_r11_r14_r4"},
353 {{al, r8, r0, r12}, false, al, "al r8 r0 r12", "al_r8_r0_r12"},
354 {{al, r11, r6, r5}, false, al, "al r11 r6 r5", "al_r11_r6_r5"},
355 {{al, r11, r13, r9}, false, al, "al r11 r13 r9", "al_r11_r13_r9"},
356 {{al, r14, r2, r0}, false, al, "al r14 r2 r0", "al_r14_r2_r0"},
357 {{al, r7, r7, r10}, false, al, "al r7 r7 r10", "al_r7_r7_r10"},
358 {{al, r10, r12, r2}, false, al, "al r10 r12 r2", "al_r10_r12_r2"},
359 {{al, r9, r10, r9}, false, al, "al r9 r10 r9", "al_r9_r10_r9"},
360 {{al, r11, r0, r9}, false, al, "al r11 r0 r9", "al_r11_r0_r9"},
361 {{al, r3, r5, r7}, false, al, "al r3 r5 r7", "al_r3_r5_r7"},
362 {{al, r0, r8, r0}, false, al, "al r0 r8 r0", "al_r0_r8_r0"},
363 {{al, r1, r11, r4}, false, al, "al r1 r11 r4", "al_r1_r11_r4"},
364 {{al, r1, r14, r3}, false, al, "al r1 r14 r3", "al_r1_r14_r3"},
365 {{al, r12, r12, r13}, false, al, "al r12 r12 r13", "al_r12_r12_r13"},
366 {{al, r14, r13, r1}, false, al, "al r14 r13 r1", "al_r14_r13_r1"},
367 {{al, r8, r7, r4}, false, al, "al r8 r7 r4", "al_r8_r7_r4"},
368 {{al, r13, r12, r7}, false, al, "al r13 r12 r7", "al_r13_r12_r7"},
369 {{al, r5, r12, r14}, false, al, "al r5 r12 r14", "al_r5_r12_r14"},
370 {{al, r2, r2, r14}, false, al, "al r2 r2 r14", "al_r2_r2_r14"},
371 {{al, r6, r5, r9}, false, al, "al r6 r5 r9", "al_r6_r5_r9"},
372 {{al, r8, r1, r3}, false, al, "al r8 r1 r3", "al_r8_r1_r3"},
373 {{al, r9, r10, r1}, false, al, "al r9 r10 r1", "al_r9_r10_r1"},
374 {{al, r0, r6, r7}, false, al, "al r0 r6 r7", "al_r0_r6_r7"},
375 {{al, r13, r9, r1}, false, al, "al r13 r9 r1", "al_r13_r9_r1"},
376 {{al, r11, r4, r8}, false, al, "al r11 r4 r8", "al_r11_r4_r8"},
377 {{al, r10, r1, r5}, false, al, "al r10 r1 r5", "al_r10_r1_r5"},
378 {{al, r7, r4, r6}, false, al, "al r7 r4 r6", "al_r7_r4_r6"},
379 {{al, r14, r3, r13}, false, al, "al r14 r3 r13", "al_r14_r3_r13"},
380 {{al, r9, r0, r1}, false, al, "al r9 r0 r1", "al_r9_r0_r1"},
381 {{al, r6, r10, r10}, false, al, "al r6 r10 r10", "al_r6_r10_r10"},
382 {{al, r13, r8, r8}, false, al, "al r13 r8 r8", "al_r13_r8_r8"},
383 {{al, r1, r1, r2}, false, al, "al r1 r1 r2", "al_r1_r1_r2"},
384 {{al, r8, r1, r9}, false, al, "al r8 r1 r9", "al_r8_r1_r9"},
385 {{al, r4, r7, r5}, false, al, "al r4 r7 r5", "al_r4_r7_r5"},
386 {{al, r2, r13, r1}, false, al, "al r2 r13 r1", "al_r2_r13_r1"},
387 {{al, r9, r9, r5}, false, al, "al r9 r9 r5", "al_r9_r9_r5"},
388 {{al, r11, r12, r8}, false, al, "al r11 r12 r8", "al_r11_r12_r8"},
389 {{al, r7, r0, r3}, false, al, "al r7 r0 r3", "al_r7_r0_r3"},
390 {{al, r3, r4, r13}, false, al, "al r3 r4 r13", "al_r3_r4_r13"},
391 {{al, r7, r7, r9}, false, al, "al r7 r7 r9", "al_r7_r7_r9"},
392 {{al, r2, r9, r5}, false, al, "al r2 r9 r5", "al_r2_r9_r5"},
393 {{al, r13, r2, r0}, false, al, "al r13 r2 r0", "al_r13_r2_r0"},
394 {{al, r8, r4, r2}, false, al, "al r8 r4 r2", "al_r8_r4_r2"},
395 {{al, r7, r11, r11}, false, al, "al r7 r11 r11", "al_r7_r11_r11"},
396 {{al, r6, r1, r2}, false, al, "al r6 r1 r2", "al_r6_r1_r2"},
397 {{al, r10, r5, r7}, false, al, "al r10 r5 r7", "al_r10_r5_r7"},
398 {{al, r8, r14, r2}, false, al, "al r8 r14 r2", "al_r8_r14_r2"},
399 {{al, r12, r13, r5}, false, al, "al r12 r13 r5", "al_r12_r13_r5"},
400 {{al, r0, r4, r8}, false, al, "al r0 r4 r8", "al_r0_r4_r8"},
401 {{al, r9, r11, r12}, false, al, "al r9 r11 r12", "al_r9_r11_r12"},
402 {{al, r6, r10, r5}, false, al, "al r6 r10 r5", "al_r6_r10_r5"},
403 {{al, r8, r10, r1}, false, al, "al r8 r10 r1", "al_r8_r10_r1"},
404 {{al, r13, r12, r4}, false, al, "al r13 r12 r4", "al_r13_r12_r4"},
405 {{al, r14, r2, r11}, false, al, "al r14 r2 r11", "al_r14_r2_r11"},
406 {{al, r1, r10, r7}, false, al, "al r1 r10 r7", "al_r1_r10_r7"},
407 {{al, r0, r1, r9}, false, al, "al r0 r1 r9", "al_r0_r1_r9"},
408 {{al, r0, r12, r11}, false, al, "al r0 r12 r11", "al_r0_r12_r11"},
409 {{al, r0, r5, r13}, false, al, "al r0 r5 r13", "al_r0_r5_r13"},
410 {{al, r9, r8, r12}, false, al, "al r9 r8 r12", "al_r9_r8_r12"},
411 {{al, r13, r3, r14}, false, al, "al r13 r3 r14", "al_r13_r3_r14"},
412 {{al, r5, r2, r10}, false, al, "al r5 r2 r10", "al_r5_r2_r10"},
413 {{al, r5, r9, r3}, false, al, "al r5 r9 r3", "al_r5_r9_r3"},
414 {{al, r10, r1, r8}, false, al, "al r10 r1 r8", "al_r10_r1_r8"},
415 {{al, r14, r1, r9}, false, al, "al r14 r1 r9", "al_r14_r1_r9"},
416 {{al, r7, r13, r2}, false, al, "al r7 r13 r2", "al_r7_r13_r2"},
417 {{al, r9, r7, r8}, false, al, "al r9 r7 r8", "al_r9_r7_r8"},
418 {{al, r4, r7, r13}, false, al, "al r4 r7 r13", "al_r4_r7_r13"},
419 {{al, r6, r9, r12}, false, al, "al r6 r9 r12", "al_r6_r9_r12"},
420 {{al, r14, r2, r8}, false, al, "al r14 r2 r8", "al_r14_r2_r8"},
421 {{al, r12, r9, r8}, false, al, "al r12 r9 r8", "al_r12_r9_r8"},
422 {{al, r13, r5, r8}, false, al, "al r13 r5 r8", "al_r13_r5_r8"},
423 {{al, r13, r11, r3}, false, al, "al r13 r11 r3", "al_r13_r11_r3"},
424 {{al, r4, r1, r9}, false, al, "al r4 r1 r9", "al_r4_r1_r9"},
425 {{al, r10, r11, r13}, false, al, "al r10 r11 r13", "al_r10_r11_r13"},
426 {{al, r11, r13, r5}, false, al, "al r11 r13 r5", "al_r11_r13_r5"},
427 {{al, r4, r3, r13}, false, al, "al r4 r3 r13", "al_r4_r3_r13"},
428 {{al, r12, r6, r3}, false, al, "al r12 r6 r3", "al_r12_r6_r3"},
429 {{al, r12, r5, r3}, false, al, "al r12 r5 r3", "al_r12_r5_r3"},
430 {{al, r3, r7, r2}, false, al, "al r3 r7 r2", "al_r3_r7_r2"},
431 {{al, r6, r9, r10}, false, al, "al r6 r9 r10", "al_r6_r9_r10"},
432 {{al, r6, r2, r1}, false, al, "al r6 r2 r1", "al_r6_r2_r1"},
433 {{al, r13, r13, r1}, false, al, "al r13 r13 r1", "al_r13_r13_r1"},
434 {{al, r10, r10, r12}, false, al, "al r10 r10 r12", "al_r10_r10_r12"},
435 {{al, r5, r5, r3}, false, al, "al r5 r5 r3", "al_r5_r5_r3"},
436 {{al, r8, r10, r14}, false, al, "al r8 r10 r14", "al_r8_r10_r14"},
437 {{al, r4, r12, r6}, false, al, "al r4 r12 r6", "al_r4_r12_r6"},
438 {{al, r1, r12, r5}, false, al, "al r1 r12 r5", "al_r1_r12_r5"},
439 {{al, r14, r1, r12}, false, al, "al r14 r1 r12", "al_r14_r1_r12"},
440 {{al, r5, r3, r10}, false, al, "al r5 r3 r10", "al_r5_r3_r10"},
441 {{al, r6, r11, r8}, false, al, "al r6 r11 r8", "al_r6_r11_r8"},
442 {{al, r1, r5, r7}, false, al, "al r1 r5 r7", "al_r1_r5_r7"},
443 {{al, r7, r14, r8}, false, al, "al r7 r14 r8", "al_r7_r14_r8"},
444 {{al, r7, r10, r11}, false, al, "al r7 r10 r11", "al_r7_r10_r11"},
445 {{al, r0, r14, r11}, false, al, "al r0 r14 r11", "al_r0_r14_r11"},
446 {{al, r0, r12, r5}, false, al, "al r0 r12 r5", "al_r0_r12_r5"},
447 {{al, r2, r2, r3}, false, al, "al r2 r2 r3", "al_r2_r2_r3"},
448 {{al, r1, r4, r7}, false, al, "al r1 r4 r7", "al_r1_r4_r7"},
449 {{al, r10, r10, r1}, false, al, "al r10 r10 r1", "al_r10_r10_r1"},
450 {{al, r7, r6, r10}, false, al, "al r7 r6 r10", "al_r7_r6_r10"},
451 {{al, r10, r14, r9}, false, al, "al r10 r14 r9", "al_r10_r14_r9"},
452 {{al, r11, r14, r14}, false, al, "al r11 r14 r14", "al_r11_r14_r14"},
453 {{al, r9, r13, r6}, false, al, "al r9 r13 r6", "al_r9_r13_r6"},
454 {{al, r3, r8, r13}, false, al, "al r3 r8 r13", "al_r3_r8_r13"},
455 {{al, r14, r6, r8}, false, al, "al r14 r6 r8", "al_r14_r6_r8"},
456 {{al, r14, r4, r4}, false, al, "al r14 r4 r4", "al_r14_r4_r4"},
457 {{al, r9, r5, r3}, false, al, "al r9 r5 r3", "al_r9_r5_r3"},
458 {{al, r2, r4, r14}, false, al, "al r2 r4 r14", "al_r2_r4_r14"},
459 {{al, r14, r2, r12}, false, al, "al r14 r2 r12", "al_r14_r2_r12"},
460 {{al, r11, r6, r2}, false, al, "al r11 r6 r2", "al_r11_r6_r2"},
461 {{al, r0, r9, r12}, false, al, "al r0 r9 r12", "al_r0_r9_r12"},
462 {{al, r3, r1, r14}, false, al, "al r3 r1 r14", "al_r3_r1_r14"},
463 {{al, r10, r14, r1}, false, al, "al r10 r14 r1", "al_r10_r14_r1"},
464 {{al, r2, r7, r13}, false, al, "al r2 r7 r13", "al_r2_r7_r13"},
465 {{al, r11, r2, r13}, false, al, "al r11 r2 r13", "al_r11_r2_r13"},
466 {{al, r4, r11, r12}, false, al, "al r4 r11 r12", "al_r4_r11_r12"},
467 {{al, r14, r12, r0}, false, al, "al r14 r12 r0", "al_r14_r12_r0"},
468 {{al, r6, r9, r8}, false, al, "al r6 r9 r8", "al_r6_r9_r8"},
469 {{al, r4, r10, r11}, false, al, "al r4 r10 r11", "al_r4_r10_r11"},
470 {{al, r1, r2, r2}, false, al, "al r1 r2 r2", "al_r1_r2_r2"},
471 {{al, r1, r8, r5}, false, al, "al r1 r8 r5", "al_r1_r8_r5"},
472 {{al, r14, r13, r6}, false, al, "al r14 r13 r6", "al_r14_r13_r6"},
473 {{al, r5, r12, r10}, false, al, "al r5 r12 r10", "al_r5_r12_r10"},
474 {{al, r14, r0, r9}, false, al, "al r14 r0 r9", "al_r14_r0_r9"},
475 {{al, r4, r6, r6}, false, al, "al r4 r6 r6", "al_r4_r6_r6"},
476 {{al, r3, r7, r11}, false, al, "al r3 r7 r11", "al_r3_r7_r11"},
477 {{al, r12, r9, r2}, false, al, "al r12 r9 r2", "al_r12_r9_r2"},
478 {{al, r1, r1, r1}, false, al, "al r1 r1 r1", "al_r1_r1_r1"},
479 {{al, r11, r5, r14}, false, al, "al r11 r5 r14", "al_r11_r5_r14"},
480 {{al, r9, r4, r6}, false, al, "al r9 r4 r6", "al_r9_r4_r6"},
481 {{al, r10, r11, r2}, false, al, "al r10 r11 r2", "al_r10_r11_r2"},
482 {{al, r14, r6, r2}, false, al, "al r14 r6 r2", "al_r14_r6_r2"},
483 {{al, r9, r4, r3}, false, al, "al r9 r4 r3", "al_r9_r4_r3"},
484 {{al, r3, r3, r8}, false, al, "al r3 r3 r8", "al_r3_r3_r8"},
485 {{al, r14, r10, r10}, false, al, "al r14 r10 r10", "al_r14_r10_r10"},
486 {{al, r2, r11, r6}, false, al, "al r2 r11 r6", "al_r2_r11_r6"},
487 {{al, r8, r12, r0}, false, al, "al r8 r12 r0", "al_r8_r12_r0"},
488 {{al, r8, r1, r13}, false, al, "al r8 r1 r13", "al_r8_r1_r13"},
489 {{al, r10, r8, r3}, false, al, "al r10 r8 r3", "al_r10_r8_r3"},
490 {{al, r12, r12, r8}, false, al, "al r12 r12 r8", "al_r12_r12_r8"},
491 {{al, r2, r2, r11}, false, al, "al r2 r2 r11", "al_r2_r2_r11"},
492 {{al, r8, r5, r5}, false, al, "al r8 r5 r5", "al_r8_r5_r5"},
493 {{al, r3, r14, r8}, false, al, "al r3 r14 r8", "al_r3_r14_r8"},
494 {{al, r13, r10, r14}, false, al, "al r13 r10 r14", "al_r13_r10_r14"},
495 {{al, r12, r6, r8}, false, al, "al r12 r6 r8", "al_r12_r6_r8"},
496 {{al, r6, r2, r5}, false, al, "al r6 r2 r5", "al_r6_r2_r5"},
497 {{al, r12, r8, r14}, false, al, "al r12 r8 r14", "al_r12_r8_r14"},
498 {{al, r10, r6, r2}, false, al, "al r10 r6 r2", "al_r10_r6_r2"},
499 {{al, r2, r4, r1}, false, al, "al r2 r4 r1", "al_r2_r4_r1"},
500 {{al, r4, r0, r12}, false, al, "al r4 r0 r12", "al_r4_r0_r12"},
501 {{al, r13, r7, r4}, false, al, "al r13 r7 r4", "al_r13_r7_r4"},
502 {{al, r14, r11, r7}, false, al, "al r14 r11 r7", "al_r14_r11_r7"},
503 {{al, r4, r4, r0}, false, al, "al r4 r4 r0", "al_r4_r4_r0"},
504 {{al, r1, r10, r2}, false, al, "al r1 r10 r2", "al_r1_r10_r2"},
505 {{al, r2, r4, r8}, false, al, "al r2 r4 r8", "al_r2_r4_r8"},
506 {{al, r2, r2, r12}, false, al, "al r2 r2 r12", "al_r2_r2_r12"},
507 {{al, r2, r4, r5}, false, al, "al r2 r4 r5", "al_r2_r4_r5"},
508 {{al, r9, r3, r12}, false, al, "al r9 r3 r12", "al_r9_r3_r12"},
509 {{al, r1, r7, r4}, false, al, "al r1 r7 r4", "al_r1_r7_r4"},
510 {{al, r13, r7, r12}, false, al, "al r13 r7 r12", "al_r13_r7_r12"},
511 {{al, r12, r14, r0}, false, al, "al r12 r14 r0", "al_r12_r14_r0"},
512 {{al, r13, r12, r14}, false, al, "al r13 r12 r14", "al_r13_r12_r14"},
513 {{al, r9, r6, r0}, false, al, "al r9 r6 r0", "al_r9_r6_r0"},
514 {{al, r1, r12, r4}, false, al, "al r1 r12 r4", "al_r1_r12_r4"},
515 {{al, r5, r8, r12}, false, al, "al r5 r8 r12", "al_r5_r8_r12"},
516 {{al, r13, r11, r9}, false, al, "al r13 r11 r9", "al_r13_r11_r9"},
517 {{al, r0, r2, r7}, false, al, "al r0 r2 r7", "al_r0_r2_r7"},
518 {{al, r5, r3, r7}, false, al, "al r5 r3 r7", "al_r5_r3_r7"},
519 {{al, r0, r3, r12}, false, al, "al r0 r3 r12", "al_r0_r3_r12"},
520 {{al, r14, r9, r4}, false, al, "al r14 r9 r4", "al_r14_r9_r4"},
521 {{al, r14, r9, r0}, false, al, "al r14 r9 r0", "al_r14_r9_r0"},
522 {{al, r3, r8, r0}, false, al, "al r3 r8 r0", "al_r3_r8_r0"},
523 {{al, r3, r5, r8}, false, al, "al r3 r5 r8", "al_r3_r5_r8"},
524 {{al, r3, r1, r8}, false, al, "al r3 r1 r8", "al_r3_r1_r8"},
525 {{al, r9, r2, r8}, false, al, "al r9 r2 r8", "al_r9_r2_r8"},
526 {{al, r3, r13, r8}, false, al, "al r3 r13 r8", "al_r3_r13_r8"},
527 {{al, r10, r2, r4}, false, al, "al r10 r2 r4", "al_r10_r2_r4"},
528 {{al, r1, r5, r9}, false, al, "al r1 r5 r9", "al_r1_r5_r9"},
529 {{al, r8, r12, r3}, false, al, "al r8 r12 r3", "al_r8_r12_r3"},
530 {{al, r7, r14, r2}, false, al, "al r7 r14 r2", "al_r7_r14_r2"},
531 {{al, r14, r7, r4}, false, al, "al r14 r7 r4", "al_r14_r7_r4"},
532 {{al, r6, r0, r6}, false, al, "al r6 r0 r6", "al_r6_r0_r6"},
533 {{al, r10, r3, r9}, false, al, "al r10 r3 r9", "al_r10_r3_r9"},
534 {{al, r7, r9, r12}, false, al, "al r7 r9 r12", "al_r7_r9_r12"},
535 {{al, r2, r3, r4}, false, al, "al r2 r3 r4", "al_r2_r3_r4"},
536 {{al, r12, r4, r3}, false, al, "al r12 r4 r3", "al_r12_r4_r3"},
537 {{al, r13, r11, r2}, false, al, "al r13 r11 r2", "al_r13_r11_r2"},
538 {{al, r12, r7, r5}, false, al, "al r12 r7 r5", "al_r12_r7_r5"},
539 {{al, r12, r1, r1}, false, al, "al r12 r1 r1", "al_r12_r1_r1"},
540 {{al, r9, r5, r13}, false, al, "al r9 r5 r13", "al_r9_r5_r13"},
541 {{al, r6, r8, r3}, false, al, "al r6 r8 r3", "al_r6_r8_r3"},
542 {{al, r10, r0, r10}, false, al, "al r10 r0 r10", "al_r10_r0_r10"},
543 {{al, r4, r3, r5}, false, al, "al r4 r3 r5", "al_r4_r3_r5"},
544 {{al, r10, r2, r1}, false, al, "al r10 r2 r1", "al_r10_r2_r1"},
545 {{al, r0, r11, r13}, false, al, "al r0 r11 r13", "al_r0_r11_r13"},
546 {{al, r1, r0, r5}, false, al, "al r1 r0 r5", "al_r1_r0_r5"},
547 {{al, r10, r10, r0}, false, al, "al r10 r10 r0", "al_r10_r10_r0"},
548 {{al, r8, r9, r8}, false, al, "al r8 r9 r8", "al_r8_r9_r8"},
549 {{al, r4, r9, r3}, false, al, "al r4 r9 r3", "al_r4_r9_r3"},
550 {{al, r9, r4, r14}, false, al, "al r9 r4 r14", "al_r9_r4_r14"},
551 {{al, r4, r14, r3}, false, al, "al r4 r14 r3", "al_r4_r14_r3"},
552 {{al, r5, r8, r2}, false, al, "al r5 r8 r2", "al_r5_r8_r2"},
553 {{al, r10, r11, r3}, false, al, "al r10 r11 r3", "al_r10_r11_r3"},
554 {{al, r6, r8, r1}, false, al, "al r6 r8 r1", "al_r6_r8_r1"},
555 {{al, r8, r9, r3}, false, al, "al r8 r9 r3", "al_r8_r9_r3"},
556 {{al, r6, r6, r13}, false, al, "al r6 r6 r13", "al_r6_r6_r13"},
557 {{al, r7, r10, r0}, false, al, "al r7 r10 r0", "al_r7_r10_r0"},
558 {{al, r6, r14, r14}, false, al, "al r6 r14 r14", "al_r6_r14_r14"},
559 {{al, r7, r4, r2}, false, al, "al r7 r4 r2", "al_r7_r4_r2"},
560 {{al, r0, r7, r0}, false, al, "al r0 r7 r0", "al_r0_r7_r0"},
561 {{al, r10, r7, r11}, false, al, "al r10 r7 r11", "al_r10_r7_r11"},
562 {{al, r1, r8, r8}, false, al, "al r1 r8 r8", "al_r1_r8_r8"},
563 {{al, r9, r4, r8}, false, al, "al r9 r4 r8", "al_r9_r4_r8"},
564 {{al, r14, r5, r2}, false, al, "al r14 r5 r2", "al_r14_r5_r2"},
565 {{al, r6, r12, r2}, false, al, "al r6 r12 r2", "al_r6_r12_r2"},
566 {{al, r1, r11, r8}, false, al, "al r1 r11 r8", "al_r1_r11_r8"},
567 {{al, r6, r5, r14}, false, al, "al r6 r5 r14", "al_r6_r5_r14"},
568 {{al, r12, r1, r2}, false, al, "al r12 r1 r2", "al_r12_r1_r2"},
569 {{al, r8, r3, r3}, false, al, "al r8 r3 r3", "al_r8_r3_r3"},
570 {{al, r13, r8, r7}, false, al, "al r13 r8 r7", "al_r13_r8_r7"},
571 {{al, r14, r11, r13}, false, al, "al r14 r11 r13", "al_r14_r11_r13"},
572 {{al, r1, r14, r14}, false, al, "al r1 r14 r14", "al_r1_r14_r14"},
573 {{al, r12, r4, r0}, false, al, "al r12 r4 r0", "al_r12_r4_r0"},
574 {{al, r0, r2, r3}, false, al, "al r0 r2 r3", "al_r0_r2_r3"},
575 {{al, r1, r5, r6}, false, al, "al r1 r5 r6", "al_r1_r5_r6"},
576 {{al, r7, r6, r4}, false, al, "al r7 r6 r4", "al_r7_r6_r4"},
577 {{al, r0, r9, r2}, false, al, "al r0 r9 r2", "al_r0_r9_r2"},
578 {{al, r7, r3, r14}, false, al, "al r7 r3 r14", "al_r7_r3_r14"},
579 {{al, r0, r5, r11}, false, al, "al r0 r5 r11", "al_r0_r5_r11"},
580 {{al, r12, r12, r5}, false, al, "al r12 r12 r5", "al_r12_r12_r5"},
581 {{al, r12, r11, r6}, false, al, "al r12 r11 r6", "al_r12_r11_r6"},
582 {{al, r2, r6, r8}, false, al, "al r2 r6 r8", "al_r2_r6_r8"},
583 {{al, r6, r10, r9}, false, al, "al r6 r10 r9", "al_r6_r10_r9"},
584 {{al, r2, r11, r1}, false, al, "al r2 r11 r1", "al_r2_r11_r1"},
585 {{al, r11, r2, r7}, false, al, "al r11 r2 r7", "al_r11_r2_r7"},
586 {{al, r7, r14, r13}, false, al, "al r7 r14 r13", "al_r7_r14_r13"},
587 {{al, r10, r5, r10}, false, al, "al r10 r5 r10", "al_r10_r5_r10"},
588 {{al, r5, r6, r1}, false, al, "al r5 r6 r1", "al_r5_r6_r1"},
589 {{al, r7, r4, r1}, false, al, "al r7 r4 r1", "al_r7_r4_r1"},
590 {{al, r7, r12, r0}, false, al, "al r7 r12 r0", "al_r7_r12_r0"},
591 {{al, r3, r6, r8}, false, al, "al r3 r6 r8", "al_r3_r6_r8"},
592 {{al, r0, r0, r8}, false, al, "al r0 r0 r8", "al_r0_r0_r8"},
593 {{al, r12, r1, r11}, false, al, "al r12 r1 r11", "al_r12_r1_r11"},
594 {{al, r14, r3, r14}, false, al, "al r14 r3 r14", "al_r14_r3_r14"},
595 {{al, r12, r0, r14}, false, al, "al r12 r0 r14", "al_r12_r0_r14"},
596 {{al, r5, r10, r9}, false, al, "al r5 r10 r9", "al_r5_r10_r9"},
597 {{al, r3, r7, r12}, false, al, "al r3 r7 r12", "al_r3_r7_r12"},
598 {{al, r10, r8, r7}, false, al, "al r10 r8 r7", "al_r10_r8_r7"},
599 {{al, r8, r14, r4}, false, al, "al r8 r14 r4", "al_r8_r14_r4"},
600 {{al, r6, r7, r7}, false, al, "al r6 r7 r7", "al_r6_r7_r7"},
601 {{al, r13, r2, r14}, false, al, "al r13 r2 r14", "al_r13_r2_r14"},
602 {{al, r1, r11, r11}, false, al, "al r1 r11 r11", "al_r1_r11_r11"},
603 {{al, r5, r0, r13}, false, al, "al r5 r0 r13", "al_r5_r0_r13"},
604 {{al, r7, r6, r11}, false, al, "al r7 r6 r11", "al_r7_r6_r11"},
605 {{al, r4, r1, r14}, false, al, "al r4 r1 r14", "al_r4_r1_r14"},
606 {{al, r10, r4, r9}, false, al, "al r10 r4 r9", "al_r10_r4_r9"},
607 {{al, r5, r6, r6}, false, al, "al r5 r6 r6", "al_r5_r6_r6"},
608 {{al, r14, r8, r13}, false, al, "al r14 r8 r13", "al_r14_r8_r13"},
609 {{al, r13, r1, r12}, false, al, "al r13 r1 r12", "al_r13_r1_r12"},
610 {{al, r2, r7, r11}, false, al, "al r2 r7 r11", "al_r2_r7_r11"},
611 {{al, r10, r4, r12}, false, al, "al r10 r4 r12", "al_r10_r4_r12"},
612 {{al, r3, r10, r12}, false, al, "al r3 r10 r12", "al_r3_r10_r12"},
613 {{al, r0, r9, r5}, false, al, "al r0 r9 r5", "al_r0_r9_r5"},
614 {{al, r8, r9, r4}, false, al, "al r8 r9 r4", "al_r8_r9_r4"},
615 {{al, r11, r0, r7}, false, al, "al r11 r0 r7", "al_r11_r0_r7"},
616 {{al, r11, r5, r7}, false, al, "al r11 r5 r7", "al_r11_r5_r7"},
617 {{al, r7, r4, r14}, false, al, "al r7 r4 r14", "al_r7_r4_r14"},
618 {{al, r14, r5, r10}, false, al, "al r14 r5 r10", "al_r14_r5_r10"},
619 {{al, r11, r9, r0}, false, al, "al r11 r9 r0", "al_r11_r9_r0"},
620 {{al, r9, r8, r4}, false, al, "al r9 r8 r4", "al_r9_r8_r4"},
621 {{al, r9, r0, r3}, false, al, "al r9 r0 r3", "al_r9_r0_r3"},
622 {{al, r11, r4, r4}, false, al, "al r11 r4 r4", "al_r11_r4_r4"},
623 {{al, r2, r5, r7}, false, al, "al r2 r5 r7", "al_r2_r5_r7"},
624 {{al, r14, r1, r8}, false, al, "al r14 r1 r8", "al_r14_r1_r8"},
625 {{al, r12, r11, r10}, false, al, "al r12 r11 r10", "al_r12_r11_r10"},
626 {{al, r6, r7, r14}, false, al, "al r6 r7 r14", "al_r6_r7_r14"},
627 {{al, r6, r13, r12}, false, al, "al r6 r13 r12", "al_r6_r13_r12"},
628 {{al, r11, r11, r13}, false, al, "al r11 r11 r13", "al_r11_r11_r13"}};
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-adc-t32.h"
633 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-adcs-t32.h"
634 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-add-t32.h"
635 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-adds-t32.h"
636 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-and-t32.h"
637 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-ands-t32.h"
638 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-asr-t32.h"
639 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-asrs-t32.h"
640 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-bic-t32.h"
641 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-bics-t32.h"
642 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-eor-t32.h"
643 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-eors-t32.h"
644 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-lsl-t32.h"
645 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-lsls-t32.h"
646 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-lsr-t32.h"
647 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-lsrs-t32.h"
648 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-orn-t32.h"
649 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-orns-t32.h"
650 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-orr-t32.h"
651 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-orrs-t32.h"
652 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-ror-t32.h"
653 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-rors-t32.h"
654 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-rsb-t32.h"
655 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-rsbs-t32.h"
656 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sbc-t32.h"
657 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sbcs-t32.h"
658 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sub-t32.h"
659 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-subs-t32.h"
660 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sxtab-t32.h"
661 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sxtab16-t32.h"
662 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-sxtah-t32.h"
663 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-uxtab-t32.h"
664 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-uxtab16-t32.h"
665 #include "aarch32/traces/assembler-cond-rd-rn-operand-rm-uxtah-t32.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.UseT32();
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("AARCH32_ASSEMBLER_COND_RD_RN_OPERAND_RM_" #mnemonic \
795 "_T32", \
796 &Test_##mnemonic);
797 FOREACH_INSTRUCTION(TEST)
798 #undef TEST
799
800 } // namespace
801 #endif
802
803 } // namespace aarch32
804 } // namespace vixl
805