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(adds) \
53 M(subs)
54
55
56 // The following definitions are defined again in each generated test, therefore
57 // we need to place them in an anomymous namespace. It expresses that they are
58 // local to this file only, and the compiler is not allowed to share these types
59 // across test files during template instantiation. Specifically, `Operands` has
60 // various layouts across generated tests so it absolutely cannot be shared.
61
62 #ifdef VIXL_INCLUDE_TARGET_T32
63 namespace {
64
65 // Values to be passed to the assembler to produce the instruction under test.
66 struct Operands {
67 Condition cond;
68 Register rd;
69 Register rn;
70 int32_t immediate;
71 };
72
73 // This structure contains all data needed to test one specific
74 // instruction.
75 struct TestData {
76 // The `operands` field represents what to pass to the assembler to
77 // produce the instruction.
78 Operands operands;
79 // True if we need to generate an IT instruction for this test to be valid.
80 bool in_it_block;
81 // The condition to give the IT instruction, this will be set to "al" by
82 // default.
83 Condition it_condition;
84 // Description of the operands, used for error reporting.
85 const char* operands_description;
86 // Unique identifier, used for generating traces.
87 const char* identifier;
88 };
89
90 struct TestResult {
91 size_t size;
92 const byte* encoding;
93 };
94
95 // Each element of this array produce one instruction encoding.
96 const TestData kTests[] =
97 {{{al, r0, r0, 0}, false, al, "al r0 r0 0", "al_r0_r0_0"},
98 {{al, r0, r0, 1}, false, al, "al r0 r0 1", "al_r0_r0_1"},
99 {{al, r0, r0, 2}, false, al, "al r0 r0 2", "al_r0_r0_2"},
100 {{al, r0, r0, 3}, false, al, "al r0 r0 3", "al_r0_r0_3"},
101 {{al, r0, r0, 4}, false, al, "al r0 r0 4", "al_r0_r0_4"},
102 {{al, r0, r0, 5}, false, al, "al r0 r0 5", "al_r0_r0_5"},
103 {{al, r0, r0, 6}, false, al, "al r0 r0 6", "al_r0_r0_6"},
104 {{al, r0, r0, 7}, false, al, "al r0 r0 7", "al_r0_r0_7"},
105 {{al, r0, r1, 0}, false, al, "al r0 r1 0", "al_r0_r1_0"},
106 {{al, r0, r1, 1}, false, al, "al r0 r1 1", "al_r0_r1_1"},
107 {{al, r0, r1, 2}, false, al, "al r0 r1 2", "al_r0_r1_2"},
108 {{al, r0, r1, 3}, false, al, "al r0 r1 3", "al_r0_r1_3"},
109 {{al, r0, r1, 4}, false, al, "al r0 r1 4", "al_r0_r1_4"},
110 {{al, r0, r1, 5}, false, al, "al r0 r1 5", "al_r0_r1_5"},
111 {{al, r0, r1, 6}, false, al, "al r0 r1 6", "al_r0_r1_6"},
112 {{al, r0, r1, 7}, false, al, "al r0 r1 7", "al_r0_r1_7"},
113 {{al, r0, r2, 0}, false, al, "al r0 r2 0", "al_r0_r2_0"},
114 {{al, r0, r2, 1}, false, al, "al r0 r2 1", "al_r0_r2_1"},
115 {{al, r0, r2, 2}, false, al, "al r0 r2 2", "al_r0_r2_2"},
116 {{al, r0, r2, 3}, false, al, "al r0 r2 3", "al_r0_r2_3"},
117 {{al, r0, r2, 4}, false, al, "al r0 r2 4", "al_r0_r2_4"},
118 {{al, r0, r2, 5}, false, al, "al r0 r2 5", "al_r0_r2_5"},
119 {{al, r0, r2, 6}, false, al, "al r0 r2 6", "al_r0_r2_6"},
120 {{al, r0, r2, 7}, false, al, "al r0 r2 7", "al_r0_r2_7"},
121 {{al, r0, r3, 0}, false, al, "al r0 r3 0", "al_r0_r3_0"},
122 {{al, r0, r3, 1}, false, al, "al r0 r3 1", "al_r0_r3_1"},
123 {{al, r0, r3, 2}, false, al, "al r0 r3 2", "al_r0_r3_2"},
124 {{al, r0, r3, 3}, false, al, "al r0 r3 3", "al_r0_r3_3"},
125 {{al, r0, r3, 4}, false, al, "al r0 r3 4", "al_r0_r3_4"},
126 {{al, r0, r3, 5}, false, al, "al r0 r3 5", "al_r0_r3_5"},
127 {{al, r0, r3, 6}, false, al, "al r0 r3 6", "al_r0_r3_6"},
128 {{al, r0, r3, 7}, false, al, "al r0 r3 7", "al_r0_r3_7"},
129 {{al, r0, r4, 0}, false, al, "al r0 r4 0", "al_r0_r4_0"},
130 {{al, r0, r4, 1}, false, al, "al r0 r4 1", "al_r0_r4_1"},
131 {{al, r0, r4, 2}, false, al, "al r0 r4 2", "al_r0_r4_2"},
132 {{al, r0, r4, 3}, false, al, "al r0 r4 3", "al_r0_r4_3"},
133 {{al, r0, r4, 4}, false, al, "al r0 r4 4", "al_r0_r4_4"},
134 {{al, r0, r4, 5}, false, al, "al r0 r4 5", "al_r0_r4_5"},
135 {{al, r0, r4, 6}, false, al, "al r0 r4 6", "al_r0_r4_6"},
136 {{al, r0, r4, 7}, false, al, "al r0 r4 7", "al_r0_r4_7"},
137 {{al, r0, r5, 0}, false, al, "al r0 r5 0", "al_r0_r5_0"},
138 {{al, r0, r5, 1}, false, al, "al r0 r5 1", "al_r0_r5_1"},
139 {{al, r0, r5, 2}, false, al, "al r0 r5 2", "al_r0_r5_2"},
140 {{al, r0, r5, 3}, false, al, "al r0 r5 3", "al_r0_r5_3"},
141 {{al, r0, r5, 4}, false, al, "al r0 r5 4", "al_r0_r5_4"},
142 {{al, r0, r5, 5}, false, al, "al r0 r5 5", "al_r0_r5_5"},
143 {{al, r0, r5, 6}, false, al, "al r0 r5 6", "al_r0_r5_6"},
144 {{al, r0, r5, 7}, false, al, "al r0 r5 7", "al_r0_r5_7"},
145 {{al, r0, r6, 0}, false, al, "al r0 r6 0", "al_r0_r6_0"},
146 {{al, r0, r6, 1}, false, al, "al r0 r6 1", "al_r0_r6_1"},
147 {{al, r0, r6, 2}, false, al, "al r0 r6 2", "al_r0_r6_2"},
148 {{al, r0, r6, 3}, false, al, "al r0 r6 3", "al_r0_r6_3"},
149 {{al, r0, r6, 4}, false, al, "al r0 r6 4", "al_r0_r6_4"},
150 {{al, r0, r6, 5}, false, al, "al r0 r6 5", "al_r0_r6_5"},
151 {{al, r0, r6, 6}, false, al, "al r0 r6 6", "al_r0_r6_6"},
152 {{al, r0, r6, 7}, false, al, "al r0 r6 7", "al_r0_r6_7"},
153 {{al, r0, r7, 0}, false, al, "al r0 r7 0", "al_r0_r7_0"},
154 {{al, r0, r7, 1}, false, al, "al r0 r7 1", "al_r0_r7_1"},
155 {{al, r0, r7, 2}, false, al, "al r0 r7 2", "al_r0_r7_2"},
156 {{al, r0, r7, 3}, false, al, "al r0 r7 3", "al_r0_r7_3"},
157 {{al, r0, r7, 4}, false, al, "al r0 r7 4", "al_r0_r7_4"},
158 {{al, r0, r7, 5}, false, al, "al r0 r7 5", "al_r0_r7_5"},
159 {{al, r0, r7, 6}, false, al, "al r0 r7 6", "al_r0_r7_6"},
160 {{al, r0, r7, 7}, false, al, "al r0 r7 7", "al_r0_r7_7"},
161 {{al, r1, r0, 0}, false, al, "al r1 r0 0", "al_r1_r0_0"},
162 {{al, r1, r0, 1}, false, al, "al r1 r0 1", "al_r1_r0_1"},
163 {{al, r1, r0, 2}, false, al, "al r1 r0 2", "al_r1_r0_2"},
164 {{al, r1, r0, 3}, false, al, "al r1 r0 3", "al_r1_r0_3"},
165 {{al, r1, r0, 4}, false, al, "al r1 r0 4", "al_r1_r0_4"},
166 {{al, r1, r0, 5}, false, al, "al r1 r0 5", "al_r1_r0_5"},
167 {{al, r1, r0, 6}, false, al, "al r1 r0 6", "al_r1_r0_6"},
168 {{al, r1, r0, 7}, false, al, "al r1 r0 7", "al_r1_r0_7"},
169 {{al, r1, r1, 0}, false, al, "al r1 r1 0", "al_r1_r1_0"},
170 {{al, r1, r1, 1}, false, al, "al r1 r1 1", "al_r1_r1_1"},
171 {{al, r1, r1, 2}, false, al, "al r1 r1 2", "al_r1_r1_2"},
172 {{al, r1, r1, 3}, false, al, "al r1 r1 3", "al_r1_r1_3"},
173 {{al, r1, r1, 4}, false, al, "al r1 r1 4", "al_r1_r1_4"},
174 {{al, r1, r1, 5}, false, al, "al r1 r1 5", "al_r1_r1_5"},
175 {{al, r1, r1, 6}, false, al, "al r1 r1 6", "al_r1_r1_6"},
176 {{al, r1, r1, 7}, false, al, "al r1 r1 7", "al_r1_r1_7"},
177 {{al, r1, r2, 0}, false, al, "al r1 r2 0", "al_r1_r2_0"},
178 {{al, r1, r2, 1}, false, al, "al r1 r2 1", "al_r1_r2_1"},
179 {{al, r1, r2, 2}, false, al, "al r1 r2 2", "al_r1_r2_2"},
180 {{al, r1, r2, 3}, false, al, "al r1 r2 3", "al_r1_r2_3"},
181 {{al, r1, r2, 4}, false, al, "al r1 r2 4", "al_r1_r2_4"},
182 {{al, r1, r2, 5}, false, al, "al r1 r2 5", "al_r1_r2_5"},
183 {{al, r1, r2, 6}, false, al, "al r1 r2 6", "al_r1_r2_6"},
184 {{al, r1, r2, 7}, false, al, "al r1 r2 7", "al_r1_r2_7"},
185 {{al, r1, r3, 0}, false, al, "al r1 r3 0", "al_r1_r3_0"},
186 {{al, r1, r3, 1}, false, al, "al r1 r3 1", "al_r1_r3_1"},
187 {{al, r1, r3, 2}, false, al, "al r1 r3 2", "al_r1_r3_2"},
188 {{al, r1, r3, 3}, false, al, "al r1 r3 3", "al_r1_r3_3"},
189 {{al, r1, r3, 4}, false, al, "al r1 r3 4", "al_r1_r3_4"},
190 {{al, r1, r3, 5}, false, al, "al r1 r3 5", "al_r1_r3_5"},
191 {{al, r1, r3, 6}, false, al, "al r1 r3 6", "al_r1_r3_6"},
192 {{al, r1, r3, 7}, false, al, "al r1 r3 7", "al_r1_r3_7"},
193 {{al, r1, r4, 0}, false, al, "al r1 r4 0", "al_r1_r4_0"},
194 {{al, r1, r4, 1}, false, al, "al r1 r4 1", "al_r1_r4_1"},
195 {{al, r1, r4, 2}, false, al, "al r1 r4 2", "al_r1_r4_2"},
196 {{al, r1, r4, 3}, false, al, "al r1 r4 3", "al_r1_r4_3"},
197 {{al, r1, r4, 4}, false, al, "al r1 r4 4", "al_r1_r4_4"},
198 {{al, r1, r4, 5}, false, al, "al r1 r4 5", "al_r1_r4_5"},
199 {{al, r1, r4, 6}, false, al, "al r1 r4 6", "al_r1_r4_6"},
200 {{al, r1, r4, 7}, false, al, "al r1 r4 7", "al_r1_r4_7"},
201 {{al, r1, r5, 0}, false, al, "al r1 r5 0", "al_r1_r5_0"},
202 {{al, r1, r5, 1}, false, al, "al r1 r5 1", "al_r1_r5_1"},
203 {{al, r1, r5, 2}, false, al, "al r1 r5 2", "al_r1_r5_2"},
204 {{al, r1, r5, 3}, false, al, "al r1 r5 3", "al_r1_r5_3"},
205 {{al, r1, r5, 4}, false, al, "al r1 r5 4", "al_r1_r5_4"},
206 {{al, r1, r5, 5}, false, al, "al r1 r5 5", "al_r1_r5_5"},
207 {{al, r1, r5, 6}, false, al, "al r1 r5 6", "al_r1_r5_6"},
208 {{al, r1, r5, 7}, false, al, "al r1 r5 7", "al_r1_r5_7"},
209 {{al, r1, r6, 0}, false, al, "al r1 r6 0", "al_r1_r6_0"},
210 {{al, r1, r6, 1}, false, al, "al r1 r6 1", "al_r1_r6_1"},
211 {{al, r1, r6, 2}, false, al, "al r1 r6 2", "al_r1_r6_2"},
212 {{al, r1, r6, 3}, false, al, "al r1 r6 3", "al_r1_r6_3"},
213 {{al, r1, r6, 4}, false, al, "al r1 r6 4", "al_r1_r6_4"},
214 {{al, r1, r6, 5}, false, al, "al r1 r6 5", "al_r1_r6_5"},
215 {{al, r1, r6, 6}, false, al, "al r1 r6 6", "al_r1_r6_6"},
216 {{al, r1, r6, 7}, false, al, "al r1 r6 7", "al_r1_r6_7"},
217 {{al, r1, r7, 0}, false, al, "al r1 r7 0", "al_r1_r7_0"},
218 {{al, r1, r7, 1}, false, al, "al r1 r7 1", "al_r1_r7_1"},
219 {{al, r1, r7, 2}, false, al, "al r1 r7 2", "al_r1_r7_2"},
220 {{al, r1, r7, 3}, false, al, "al r1 r7 3", "al_r1_r7_3"},
221 {{al, r1, r7, 4}, false, al, "al r1 r7 4", "al_r1_r7_4"},
222 {{al, r1, r7, 5}, false, al, "al r1 r7 5", "al_r1_r7_5"},
223 {{al, r1, r7, 6}, false, al, "al r1 r7 6", "al_r1_r7_6"},
224 {{al, r1, r7, 7}, false, al, "al r1 r7 7", "al_r1_r7_7"},
225 {{al, r2, r0, 0}, false, al, "al r2 r0 0", "al_r2_r0_0"},
226 {{al, r2, r0, 1}, false, al, "al r2 r0 1", "al_r2_r0_1"},
227 {{al, r2, r0, 2}, false, al, "al r2 r0 2", "al_r2_r0_2"},
228 {{al, r2, r0, 3}, false, al, "al r2 r0 3", "al_r2_r0_3"},
229 {{al, r2, r0, 4}, false, al, "al r2 r0 4", "al_r2_r0_4"},
230 {{al, r2, r0, 5}, false, al, "al r2 r0 5", "al_r2_r0_5"},
231 {{al, r2, r0, 6}, false, al, "al r2 r0 6", "al_r2_r0_6"},
232 {{al, r2, r0, 7}, false, al, "al r2 r0 7", "al_r2_r0_7"},
233 {{al, r2, r1, 0}, false, al, "al r2 r1 0", "al_r2_r1_0"},
234 {{al, r2, r1, 1}, false, al, "al r2 r1 1", "al_r2_r1_1"},
235 {{al, r2, r1, 2}, false, al, "al r2 r1 2", "al_r2_r1_2"},
236 {{al, r2, r1, 3}, false, al, "al r2 r1 3", "al_r2_r1_3"},
237 {{al, r2, r1, 4}, false, al, "al r2 r1 4", "al_r2_r1_4"},
238 {{al, r2, r1, 5}, false, al, "al r2 r1 5", "al_r2_r1_5"},
239 {{al, r2, r1, 6}, false, al, "al r2 r1 6", "al_r2_r1_6"},
240 {{al, r2, r1, 7}, false, al, "al r2 r1 7", "al_r2_r1_7"},
241 {{al, r2, r2, 0}, false, al, "al r2 r2 0", "al_r2_r2_0"},
242 {{al, r2, r2, 1}, false, al, "al r2 r2 1", "al_r2_r2_1"},
243 {{al, r2, r2, 2}, false, al, "al r2 r2 2", "al_r2_r2_2"},
244 {{al, r2, r2, 3}, false, al, "al r2 r2 3", "al_r2_r2_3"},
245 {{al, r2, r2, 4}, false, al, "al r2 r2 4", "al_r2_r2_4"},
246 {{al, r2, r2, 5}, false, al, "al r2 r2 5", "al_r2_r2_5"},
247 {{al, r2, r2, 6}, false, al, "al r2 r2 6", "al_r2_r2_6"},
248 {{al, r2, r2, 7}, false, al, "al r2 r2 7", "al_r2_r2_7"},
249 {{al, r2, r3, 0}, false, al, "al r2 r3 0", "al_r2_r3_0"},
250 {{al, r2, r3, 1}, false, al, "al r2 r3 1", "al_r2_r3_1"},
251 {{al, r2, r3, 2}, false, al, "al r2 r3 2", "al_r2_r3_2"},
252 {{al, r2, r3, 3}, false, al, "al r2 r3 3", "al_r2_r3_3"},
253 {{al, r2, r3, 4}, false, al, "al r2 r3 4", "al_r2_r3_4"},
254 {{al, r2, r3, 5}, false, al, "al r2 r3 5", "al_r2_r3_5"},
255 {{al, r2, r3, 6}, false, al, "al r2 r3 6", "al_r2_r3_6"},
256 {{al, r2, r3, 7}, false, al, "al r2 r3 7", "al_r2_r3_7"},
257 {{al, r2, r4, 0}, false, al, "al r2 r4 0", "al_r2_r4_0"},
258 {{al, r2, r4, 1}, false, al, "al r2 r4 1", "al_r2_r4_1"},
259 {{al, r2, r4, 2}, false, al, "al r2 r4 2", "al_r2_r4_2"},
260 {{al, r2, r4, 3}, false, al, "al r2 r4 3", "al_r2_r4_3"},
261 {{al, r2, r4, 4}, false, al, "al r2 r4 4", "al_r2_r4_4"},
262 {{al, r2, r4, 5}, false, al, "al r2 r4 5", "al_r2_r4_5"},
263 {{al, r2, r4, 6}, false, al, "al r2 r4 6", "al_r2_r4_6"},
264 {{al, r2, r4, 7}, false, al, "al r2 r4 7", "al_r2_r4_7"},
265 {{al, r2, r5, 0}, false, al, "al r2 r5 0", "al_r2_r5_0"},
266 {{al, r2, r5, 1}, false, al, "al r2 r5 1", "al_r2_r5_1"},
267 {{al, r2, r5, 2}, false, al, "al r2 r5 2", "al_r2_r5_2"},
268 {{al, r2, r5, 3}, false, al, "al r2 r5 3", "al_r2_r5_3"},
269 {{al, r2, r5, 4}, false, al, "al r2 r5 4", "al_r2_r5_4"},
270 {{al, r2, r5, 5}, false, al, "al r2 r5 5", "al_r2_r5_5"},
271 {{al, r2, r5, 6}, false, al, "al r2 r5 6", "al_r2_r5_6"},
272 {{al, r2, r5, 7}, false, al, "al r2 r5 7", "al_r2_r5_7"},
273 {{al, r2, r6, 0}, false, al, "al r2 r6 0", "al_r2_r6_0"},
274 {{al, r2, r6, 1}, false, al, "al r2 r6 1", "al_r2_r6_1"},
275 {{al, r2, r6, 2}, false, al, "al r2 r6 2", "al_r2_r6_2"},
276 {{al, r2, r6, 3}, false, al, "al r2 r6 3", "al_r2_r6_3"},
277 {{al, r2, r6, 4}, false, al, "al r2 r6 4", "al_r2_r6_4"},
278 {{al, r2, r6, 5}, false, al, "al r2 r6 5", "al_r2_r6_5"},
279 {{al, r2, r6, 6}, false, al, "al r2 r6 6", "al_r2_r6_6"},
280 {{al, r2, r6, 7}, false, al, "al r2 r6 7", "al_r2_r6_7"},
281 {{al, r2, r7, 0}, false, al, "al r2 r7 0", "al_r2_r7_0"},
282 {{al, r2, r7, 1}, false, al, "al r2 r7 1", "al_r2_r7_1"},
283 {{al, r2, r7, 2}, false, al, "al r2 r7 2", "al_r2_r7_2"},
284 {{al, r2, r7, 3}, false, al, "al r2 r7 3", "al_r2_r7_3"},
285 {{al, r2, r7, 4}, false, al, "al r2 r7 4", "al_r2_r7_4"},
286 {{al, r2, r7, 5}, false, al, "al r2 r7 5", "al_r2_r7_5"},
287 {{al, r2, r7, 6}, false, al, "al r2 r7 6", "al_r2_r7_6"},
288 {{al, r2, r7, 7}, false, al, "al r2 r7 7", "al_r2_r7_7"},
289 {{al, r3, r0, 0}, false, al, "al r3 r0 0", "al_r3_r0_0"},
290 {{al, r3, r0, 1}, false, al, "al r3 r0 1", "al_r3_r0_1"},
291 {{al, r3, r0, 2}, false, al, "al r3 r0 2", "al_r3_r0_2"},
292 {{al, r3, r0, 3}, false, al, "al r3 r0 3", "al_r3_r0_3"},
293 {{al, r3, r0, 4}, false, al, "al r3 r0 4", "al_r3_r0_4"},
294 {{al, r3, r0, 5}, false, al, "al r3 r0 5", "al_r3_r0_5"},
295 {{al, r3, r0, 6}, false, al, "al r3 r0 6", "al_r3_r0_6"},
296 {{al, r3, r0, 7}, false, al, "al r3 r0 7", "al_r3_r0_7"},
297 {{al, r3, r1, 0}, false, al, "al r3 r1 0", "al_r3_r1_0"},
298 {{al, r3, r1, 1}, false, al, "al r3 r1 1", "al_r3_r1_1"},
299 {{al, r3, r1, 2}, false, al, "al r3 r1 2", "al_r3_r1_2"},
300 {{al, r3, r1, 3}, false, al, "al r3 r1 3", "al_r3_r1_3"},
301 {{al, r3, r1, 4}, false, al, "al r3 r1 4", "al_r3_r1_4"},
302 {{al, r3, r1, 5}, false, al, "al r3 r1 5", "al_r3_r1_5"},
303 {{al, r3, r1, 6}, false, al, "al r3 r1 6", "al_r3_r1_6"},
304 {{al, r3, r1, 7}, false, al, "al r3 r1 7", "al_r3_r1_7"},
305 {{al, r3, r2, 0}, false, al, "al r3 r2 0", "al_r3_r2_0"},
306 {{al, r3, r2, 1}, false, al, "al r3 r2 1", "al_r3_r2_1"},
307 {{al, r3, r2, 2}, false, al, "al r3 r2 2", "al_r3_r2_2"},
308 {{al, r3, r2, 3}, false, al, "al r3 r2 3", "al_r3_r2_3"},
309 {{al, r3, r2, 4}, false, al, "al r3 r2 4", "al_r3_r2_4"},
310 {{al, r3, r2, 5}, false, al, "al r3 r2 5", "al_r3_r2_5"},
311 {{al, r3, r2, 6}, false, al, "al r3 r2 6", "al_r3_r2_6"},
312 {{al, r3, r2, 7}, false, al, "al r3 r2 7", "al_r3_r2_7"},
313 {{al, r3, r3, 0}, false, al, "al r3 r3 0", "al_r3_r3_0"},
314 {{al, r3, r3, 1}, false, al, "al r3 r3 1", "al_r3_r3_1"},
315 {{al, r3, r3, 2}, false, al, "al r3 r3 2", "al_r3_r3_2"},
316 {{al, r3, r3, 3}, false, al, "al r3 r3 3", "al_r3_r3_3"},
317 {{al, r3, r3, 4}, false, al, "al r3 r3 4", "al_r3_r3_4"},
318 {{al, r3, r3, 5}, false, al, "al r3 r3 5", "al_r3_r3_5"},
319 {{al, r3, r3, 6}, false, al, "al r3 r3 6", "al_r3_r3_6"},
320 {{al, r3, r3, 7}, false, al, "al r3 r3 7", "al_r3_r3_7"},
321 {{al, r3, r4, 0}, false, al, "al r3 r4 0", "al_r3_r4_0"},
322 {{al, r3, r4, 1}, false, al, "al r3 r4 1", "al_r3_r4_1"},
323 {{al, r3, r4, 2}, false, al, "al r3 r4 2", "al_r3_r4_2"},
324 {{al, r3, r4, 3}, false, al, "al r3 r4 3", "al_r3_r4_3"},
325 {{al, r3, r4, 4}, false, al, "al r3 r4 4", "al_r3_r4_4"},
326 {{al, r3, r4, 5}, false, al, "al r3 r4 5", "al_r3_r4_5"},
327 {{al, r3, r4, 6}, false, al, "al r3 r4 6", "al_r3_r4_6"},
328 {{al, r3, r4, 7}, false, al, "al r3 r4 7", "al_r3_r4_7"},
329 {{al, r3, r5, 0}, false, al, "al r3 r5 0", "al_r3_r5_0"},
330 {{al, r3, r5, 1}, false, al, "al r3 r5 1", "al_r3_r5_1"},
331 {{al, r3, r5, 2}, false, al, "al r3 r5 2", "al_r3_r5_2"},
332 {{al, r3, r5, 3}, false, al, "al r3 r5 3", "al_r3_r5_3"},
333 {{al, r3, r5, 4}, false, al, "al r3 r5 4", "al_r3_r5_4"},
334 {{al, r3, r5, 5}, false, al, "al r3 r5 5", "al_r3_r5_5"},
335 {{al, r3, r5, 6}, false, al, "al r3 r5 6", "al_r3_r5_6"},
336 {{al, r3, r5, 7}, false, al, "al r3 r5 7", "al_r3_r5_7"},
337 {{al, r3, r6, 0}, false, al, "al r3 r6 0", "al_r3_r6_0"},
338 {{al, r3, r6, 1}, false, al, "al r3 r6 1", "al_r3_r6_1"},
339 {{al, r3, r6, 2}, false, al, "al r3 r6 2", "al_r3_r6_2"},
340 {{al, r3, r6, 3}, false, al, "al r3 r6 3", "al_r3_r6_3"},
341 {{al, r3, r6, 4}, false, al, "al r3 r6 4", "al_r3_r6_4"},
342 {{al, r3, r6, 5}, false, al, "al r3 r6 5", "al_r3_r6_5"},
343 {{al, r3, r6, 6}, false, al, "al r3 r6 6", "al_r3_r6_6"},
344 {{al, r3, r6, 7}, false, al, "al r3 r6 7", "al_r3_r6_7"},
345 {{al, r3, r7, 0}, false, al, "al r3 r7 0", "al_r3_r7_0"},
346 {{al, r3, r7, 1}, false, al, "al r3 r7 1", "al_r3_r7_1"},
347 {{al, r3, r7, 2}, false, al, "al r3 r7 2", "al_r3_r7_2"},
348 {{al, r3, r7, 3}, false, al, "al r3 r7 3", "al_r3_r7_3"},
349 {{al, r3, r7, 4}, false, al, "al r3 r7 4", "al_r3_r7_4"},
350 {{al, r3, r7, 5}, false, al, "al r3 r7 5", "al_r3_r7_5"},
351 {{al, r3, r7, 6}, false, al, "al r3 r7 6", "al_r3_r7_6"},
352 {{al, r3, r7, 7}, false, al, "al r3 r7 7", "al_r3_r7_7"},
353 {{al, r4, r0, 0}, false, al, "al r4 r0 0", "al_r4_r0_0"},
354 {{al, r4, r0, 1}, false, al, "al r4 r0 1", "al_r4_r0_1"},
355 {{al, r4, r0, 2}, false, al, "al r4 r0 2", "al_r4_r0_2"},
356 {{al, r4, r0, 3}, false, al, "al r4 r0 3", "al_r4_r0_3"},
357 {{al, r4, r0, 4}, false, al, "al r4 r0 4", "al_r4_r0_4"},
358 {{al, r4, r0, 5}, false, al, "al r4 r0 5", "al_r4_r0_5"},
359 {{al, r4, r0, 6}, false, al, "al r4 r0 6", "al_r4_r0_6"},
360 {{al, r4, r0, 7}, false, al, "al r4 r0 7", "al_r4_r0_7"},
361 {{al, r4, r1, 0}, false, al, "al r4 r1 0", "al_r4_r1_0"},
362 {{al, r4, r1, 1}, false, al, "al r4 r1 1", "al_r4_r1_1"},
363 {{al, r4, r1, 2}, false, al, "al r4 r1 2", "al_r4_r1_2"},
364 {{al, r4, r1, 3}, false, al, "al r4 r1 3", "al_r4_r1_3"},
365 {{al, r4, r1, 4}, false, al, "al r4 r1 4", "al_r4_r1_4"},
366 {{al, r4, r1, 5}, false, al, "al r4 r1 5", "al_r4_r1_5"},
367 {{al, r4, r1, 6}, false, al, "al r4 r1 6", "al_r4_r1_6"},
368 {{al, r4, r1, 7}, false, al, "al r4 r1 7", "al_r4_r1_7"},
369 {{al, r4, r2, 0}, false, al, "al r4 r2 0", "al_r4_r2_0"},
370 {{al, r4, r2, 1}, false, al, "al r4 r2 1", "al_r4_r2_1"},
371 {{al, r4, r2, 2}, false, al, "al r4 r2 2", "al_r4_r2_2"},
372 {{al, r4, r2, 3}, false, al, "al r4 r2 3", "al_r4_r2_3"},
373 {{al, r4, r2, 4}, false, al, "al r4 r2 4", "al_r4_r2_4"},
374 {{al, r4, r2, 5}, false, al, "al r4 r2 5", "al_r4_r2_5"},
375 {{al, r4, r2, 6}, false, al, "al r4 r2 6", "al_r4_r2_6"},
376 {{al, r4, r2, 7}, false, al, "al r4 r2 7", "al_r4_r2_7"},
377 {{al, r4, r3, 0}, false, al, "al r4 r3 0", "al_r4_r3_0"},
378 {{al, r4, r3, 1}, false, al, "al r4 r3 1", "al_r4_r3_1"},
379 {{al, r4, r3, 2}, false, al, "al r4 r3 2", "al_r4_r3_2"},
380 {{al, r4, r3, 3}, false, al, "al r4 r3 3", "al_r4_r3_3"},
381 {{al, r4, r3, 4}, false, al, "al r4 r3 4", "al_r4_r3_4"},
382 {{al, r4, r3, 5}, false, al, "al r4 r3 5", "al_r4_r3_5"},
383 {{al, r4, r3, 6}, false, al, "al r4 r3 6", "al_r4_r3_6"},
384 {{al, r4, r3, 7}, false, al, "al r4 r3 7", "al_r4_r3_7"},
385 {{al, r4, r4, 0}, false, al, "al r4 r4 0", "al_r4_r4_0"},
386 {{al, r4, r4, 1}, false, al, "al r4 r4 1", "al_r4_r4_1"},
387 {{al, r4, r4, 2}, false, al, "al r4 r4 2", "al_r4_r4_2"},
388 {{al, r4, r4, 3}, false, al, "al r4 r4 3", "al_r4_r4_3"},
389 {{al, r4, r4, 4}, false, al, "al r4 r4 4", "al_r4_r4_4"},
390 {{al, r4, r4, 5}, false, al, "al r4 r4 5", "al_r4_r4_5"},
391 {{al, r4, r4, 6}, false, al, "al r4 r4 6", "al_r4_r4_6"},
392 {{al, r4, r4, 7}, false, al, "al r4 r4 7", "al_r4_r4_7"},
393 {{al, r4, r5, 0}, false, al, "al r4 r5 0", "al_r4_r5_0"},
394 {{al, r4, r5, 1}, false, al, "al r4 r5 1", "al_r4_r5_1"},
395 {{al, r4, r5, 2}, false, al, "al r4 r5 2", "al_r4_r5_2"},
396 {{al, r4, r5, 3}, false, al, "al r4 r5 3", "al_r4_r5_3"},
397 {{al, r4, r5, 4}, false, al, "al r4 r5 4", "al_r4_r5_4"},
398 {{al, r4, r5, 5}, false, al, "al r4 r5 5", "al_r4_r5_5"},
399 {{al, r4, r5, 6}, false, al, "al r4 r5 6", "al_r4_r5_6"},
400 {{al, r4, r5, 7}, false, al, "al r4 r5 7", "al_r4_r5_7"},
401 {{al, r4, r6, 0}, false, al, "al r4 r6 0", "al_r4_r6_0"},
402 {{al, r4, r6, 1}, false, al, "al r4 r6 1", "al_r4_r6_1"},
403 {{al, r4, r6, 2}, false, al, "al r4 r6 2", "al_r4_r6_2"},
404 {{al, r4, r6, 3}, false, al, "al r4 r6 3", "al_r4_r6_3"},
405 {{al, r4, r6, 4}, false, al, "al r4 r6 4", "al_r4_r6_4"},
406 {{al, r4, r6, 5}, false, al, "al r4 r6 5", "al_r4_r6_5"},
407 {{al, r4, r6, 6}, false, al, "al r4 r6 6", "al_r4_r6_6"},
408 {{al, r4, r6, 7}, false, al, "al r4 r6 7", "al_r4_r6_7"},
409 {{al, r4, r7, 0}, false, al, "al r4 r7 0", "al_r4_r7_0"},
410 {{al, r4, r7, 1}, false, al, "al r4 r7 1", "al_r4_r7_1"},
411 {{al, r4, r7, 2}, false, al, "al r4 r7 2", "al_r4_r7_2"},
412 {{al, r4, r7, 3}, false, al, "al r4 r7 3", "al_r4_r7_3"},
413 {{al, r4, r7, 4}, false, al, "al r4 r7 4", "al_r4_r7_4"},
414 {{al, r4, r7, 5}, false, al, "al r4 r7 5", "al_r4_r7_5"},
415 {{al, r4, r7, 6}, false, al, "al r4 r7 6", "al_r4_r7_6"},
416 {{al, r4, r7, 7}, false, al, "al r4 r7 7", "al_r4_r7_7"},
417 {{al, r5, r0, 0}, false, al, "al r5 r0 0", "al_r5_r0_0"},
418 {{al, r5, r0, 1}, false, al, "al r5 r0 1", "al_r5_r0_1"},
419 {{al, r5, r0, 2}, false, al, "al r5 r0 2", "al_r5_r0_2"},
420 {{al, r5, r0, 3}, false, al, "al r5 r0 3", "al_r5_r0_3"},
421 {{al, r5, r0, 4}, false, al, "al r5 r0 4", "al_r5_r0_4"},
422 {{al, r5, r0, 5}, false, al, "al r5 r0 5", "al_r5_r0_5"},
423 {{al, r5, r0, 6}, false, al, "al r5 r0 6", "al_r5_r0_6"},
424 {{al, r5, r0, 7}, false, al, "al r5 r0 7", "al_r5_r0_7"},
425 {{al, r5, r1, 0}, false, al, "al r5 r1 0", "al_r5_r1_0"},
426 {{al, r5, r1, 1}, false, al, "al r5 r1 1", "al_r5_r1_1"},
427 {{al, r5, r1, 2}, false, al, "al r5 r1 2", "al_r5_r1_2"},
428 {{al, r5, r1, 3}, false, al, "al r5 r1 3", "al_r5_r1_3"},
429 {{al, r5, r1, 4}, false, al, "al r5 r1 4", "al_r5_r1_4"},
430 {{al, r5, r1, 5}, false, al, "al r5 r1 5", "al_r5_r1_5"},
431 {{al, r5, r1, 6}, false, al, "al r5 r1 6", "al_r5_r1_6"},
432 {{al, r5, r1, 7}, false, al, "al r5 r1 7", "al_r5_r1_7"},
433 {{al, r5, r2, 0}, false, al, "al r5 r2 0", "al_r5_r2_0"},
434 {{al, r5, r2, 1}, false, al, "al r5 r2 1", "al_r5_r2_1"},
435 {{al, r5, r2, 2}, false, al, "al r5 r2 2", "al_r5_r2_2"},
436 {{al, r5, r2, 3}, false, al, "al r5 r2 3", "al_r5_r2_3"},
437 {{al, r5, r2, 4}, false, al, "al r5 r2 4", "al_r5_r2_4"},
438 {{al, r5, r2, 5}, false, al, "al r5 r2 5", "al_r5_r2_5"},
439 {{al, r5, r2, 6}, false, al, "al r5 r2 6", "al_r5_r2_6"},
440 {{al, r5, r2, 7}, false, al, "al r5 r2 7", "al_r5_r2_7"},
441 {{al, r5, r3, 0}, false, al, "al r5 r3 0", "al_r5_r3_0"},
442 {{al, r5, r3, 1}, false, al, "al r5 r3 1", "al_r5_r3_1"},
443 {{al, r5, r3, 2}, false, al, "al r5 r3 2", "al_r5_r3_2"},
444 {{al, r5, r3, 3}, false, al, "al r5 r3 3", "al_r5_r3_3"},
445 {{al, r5, r3, 4}, false, al, "al r5 r3 4", "al_r5_r3_4"},
446 {{al, r5, r3, 5}, false, al, "al r5 r3 5", "al_r5_r3_5"},
447 {{al, r5, r3, 6}, false, al, "al r5 r3 6", "al_r5_r3_6"},
448 {{al, r5, r3, 7}, false, al, "al r5 r3 7", "al_r5_r3_7"},
449 {{al, r5, r4, 0}, false, al, "al r5 r4 0", "al_r5_r4_0"},
450 {{al, r5, r4, 1}, false, al, "al r5 r4 1", "al_r5_r4_1"},
451 {{al, r5, r4, 2}, false, al, "al r5 r4 2", "al_r5_r4_2"},
452 {{al, r5, r4, 3}, false, al, "al r5 r4 3", "al_r5_r4_3"},
453 {{al, r5, r4, 4}, false, al, "al r5 r4 4", "al_r5_r4_4"},
454 {{al, r5, r4, 5}, false, al, "al r5 r4 5", "al_r5_r4_5"},
455 {{al, r5, r4, 6}, false, al, "al r5 r4 6", "al_r5_r4_6"},
456 {{al, r5, r4, 7}, false, al, "al r5 r4 7", "al_r5_r4_7"},
457 {{al, r5, r5, 0}, false, al, "al r5 r5 0", "al_r5_r5_0"},
458 {{al, r5, r5, 1}, false, al, "al r5 r5 1", "al_r5_r5_1"},
459 {{al, r5, r5, 2}, false, al, "al r5 r5 2", "al_r5_r5_2"},
460 {{al, r5, r5, 3}, false, al, "al r5 r5 3", "al_r5_r5_3"},
461 {{al, r5, r5, 4}, false, al, "al r5 r5 4", "al_r5_r5_4"},
462 {{al, r5, r5, 5}, false, al, "al r5 r5 5", "al_r5_r5_5"},
463 {{al, r5, r5, 6}, false, al, "al r5 r5 6", "al_r5_r5_6"},
464 {{al, r5, r5, 7}, false, al, "al r5 r5 7", "al_r5_r5_7"},
465 {{al, r5, r6, 0}, false, al, "al r5 r6 0", "al_r5_r6_0"},
466 {{al, r5, r6, 1}, false, al, "al r5 r6 1", "al_r5_r6_1"},
467 {{al, r5, r6, 2}, false, al, "al r5 r6 2", "al_r5_r6_2"},
468 {{al, r5, r6, 3}, false, al, "al r5 r6 3", "al_r5_r6_3"},
469 {{al, r5, r6, 4}, false, al, "al r5 r6 4", "al_r5_r6_4"},
470 {{al, r5, r6, 5}, false, al, "al r5 r6 5", "al_r5_r6_5"},
471 {{al, r5, r6, 6}, false, al, "al r5 r6 6", "al_r5_r6_6"},
472 {{al, r5, r6, 7}, false, al, "al r5 r6 7", "al_r5_r6_7"},
473 {{al, r5, r7, 0}, false, al, "al r5 r7 0", "al_r5_r7_0"},
474 {{al, r5, r7, 1}, false, al, "al r5 r7 1", "al_r5_r7_1"},
475 {{al, r5, r7, 2}, false, al, "al r5 r7 2", "al_r5_r7_2"},
476 {{al, r5, r7, 3}, false, al, "al r5 r7 3", "al_r5_r7_3"},
477 {{al, r5, r7, 4}, false, al, "al r5 r7 4", "al_r5_r7_4"},
478 {{al, r5, r7, 5}, false, al, "al r5 r7 5", "al_r5_r7_5"},
479 {{al, r5, r7, 6}, false, al, "al r5 r7 6", "al_r5_r7_6"},
480 {{al, r5, r7, 7}, false, al, "al r5 r7 7", "al_r5_r7_7"},
481 {{al, r6, r0, 0}, false, al, "al r6 r0 0", "al_r6_r0_0"},
482 {{al, r6, r0, 1}, false, al, "al r6 r0 1", "al_r6_r0_1"},
483 {{al, r6, r0, 2}, false, al, "al r6 r0 2", "al_r6_r0_2"},
484 {{al, r6, r0, 3}, false, al, "al r6 r0 3", "al_r6_r0_3"},
485 {{al, r6, r0, 4}, false, al, "al r6 r0 4", "al_r6_r0_4"},
486 {{al, r6, r0, 5}, false, al, "al r6 r0 5", "al_r6_r0_5"},
487 {{al, r6, r0, 6}, false, al, "al r6 r0 6", "al_r6_r0_6"},
488 {{al, r6, r0, 7}, false, al, "al r6 r0 7", "al_r6_r0_7"},
489 {{al, r6, r1, 0}, false, al, "al r6 r1 0", "al_r6_r1_0"},
490 {{al, r6, r1, 1}, false, al, "al r6 r1 1", "al_r6_r1_1"},
491 {{al, r6, r1, 2}, false, al, "al r6 r1 2", "al_r6_r1_2"},
492 {{al, r6, r1, 3}, false, al, "al r6 r1 3", "al_r6_r1_3"},
493 {{al, r6, r1, 4}, false, al, "al r6 r1 4", "al_r6_r1_4"},
494 {{al, r6, r1, 5}, false, al, "al r6 r1 5", "al_r6_r1_5"},
495 {{al, r6, r1, 6}, false, al, "al r6 r1 6", "al_r6_r1_6"},
496 {{al, r6, r1, 7}, false, al, "al r6 r1 7", "al_r6_r1_7"},
497 {{al, r6, r2, 0}, false, al, "al r6 r2 0", "al_r6_r2_0"},
498 {{al, r6, r2, 1}, false, al, "al r6 r2 1", "al_r6_r2_1"},
499 {{al, r6, r2, 2}, false, al, "al r6 r2 2", "al_r6_r2_2"},
500 {{al, r6, r2, 3}, false, al, "al r6 r2 3", "al_r6_r2_3"},
501 {{al, r6, r2, 4}, false, al, "al r6 r2 4", "al_r6_r2_4"},
502 {{al, r6, r2, 5}, false, al, "al r6 r2 5", "al_r6_r2_5"},
503 {{al, r6, r2, 6}, false, al, "al r6 r2 6", "al_r6_r2_6"},
504 {{al, r6, r2, 7}, false, al, "al r6 r2 7", "al_r6_r2_7"},
505 {{al, r6, r3, 0}, false, al, "al r6 r3 0", "al_r6_r3_0"},
506 {{al, r6, r3, 1}, false, al, "al r6 r3 1", "al_r6_r3_1"},
507 {{al, r6, r3, 2}, false, al, "al r6 r3 2", "al_r6_r3_2"},
508 {{al, r6, r3, 3}, false, al, "al r6 r3 3", "al_r6_r3_3"},
509 {{al, r6, r3, 4}, false, al, "al r6 r3 4", "al_r6_r3_4"},
510 {{al, r6, r3, 5}, false, al, "al r6 r3 5", "al_r6_r3_5"},
511 {{al, r6, r3, 6}, false, al, "al r6 r3 6", "al_r6_r3_6"},
512 {{al, r6, r3, 7}, false, al, "al r6 r3 7", "al_r6_r3_7"},
513 {{al, r6, r4, 0}, false, al, "al r6 r4 0", "al_r6_r4_0"},
514 {{al, r6, r4, 1}, false, al, "al r6 r4 1", "al_r6_r4_1"},
515 {{al, r6, r4, 2}, false, al, "al r6 r4 2", "al_r6_r4_2"},
516 {{al, r6, r4, 3}, false, al, "al r6 r4 3", "al_r6_r4_3"},
517 {{al, r6, r4, 4}, false, al, "al r6 r4 4", "al_r6_r4_4"},
518 {{al, r6, r4, 5}, false, al, "al r6 r4 5", "al_r6_r4_5"},
519 {{al, r6, r4, 6}, false, al, "al r6 r4 6", "al_r6_r4_6"},
520 {{al, r6, r4, 7}, false, al, "al r6 r4 7", "al_r6_r4_7"},
521 {{al, r6, r5, 0}, false, al, "al r6 r5 0", "al_r6_r5_0"},
522 {{al, r6, r5, 1}, false, al, "al r6 r5 1", "al_r6_r5_1"},
523 {{al, r6, r5, 2}, false, al, "al r6 r5 2", "al_r6_r5_2"},
524 {{al, r6, r5, 3}, false, al, "al r6 r5 3", "al_r6_r5_3"},
525 {{al, r6, r5, 4}, false, al, "al r6 r5 4", "al_r6_r5_4"},
526 {{al, r6, r5, 5}, false, al, "al r6 r5 5", "al_r6_r5_5"},
527 {{al, r6, r5, 6}, false, al, "al r6 r5 6", "al_r6_r5_6"},
528 {{al, r6, r5, 7}, false, al, "al r6 r5 7", "al_r6_r5_7"},
529 {{al, r6, r6, 0}, false, al, "al r6 r6 0", "al_r6_r6_0"},
530 {{al, r6, r6, 1}, false, al, "al r6 r6 1", "al_r6_r6_1"},
531 {{al, r6, r6, 2}, false, al, "al r6 r6 2", "al_r6_r6_2"},
532 {{al, r6, r6, 3}, false, al, "al r6 r6 3", "al_r6_r6_3"},
533 {{al, r6, r6, 4}, false, al, "al r6 r6 4", "al_r6_r6_4"},
534 {{al, r6, r6, 5}, false, al, "al r6 r6 5", "al_r6_r6_5"},
535 {{al, r6, r6, 6}, false, al, "al r6 r6 6", "al_r6_r6_6"},
536 {{al, r6, r6, 7}, false, al, "al r6 r6 7", "al_r6_r6_7"},
537 {{al, r6, r7, 0}, false, al, "al r6 r7 0", "al_r6_r7_0"},
538 {{al, r6, r7, 1}, false, al, "al r6 r7 1", "al_r6_r7_1"},
539 {{al, r6, r7, 2}, false, al, "al r6 r7 2", "al_r6_r7_2"},
540 {{al, r6, r7, 3}, false, al, "al r6 r7 3", "al_r6_r7_3"},
541 {{al, r6, r7, 4}, false, al, "al r6 r7 4", "al_r6_r7_4"},
542 {{al, r6, r7, 5}, false, al, "al r6 r7 5", "al_r6_r7_5"},
543 {{al, r6, r7, 6}, false, al, "al r6 r7 6", "al_r6_r7_6"},
544 {{al, r6, r7, 7}, false, al, "al r6 r7 7", "al_r6_r7_7"},
545 {{al, r7, r0, 0}, false, al, "al r7 r0 0", "al_r7_r0_0"},
546 {{al, r7, r0, 1}, false, al, "al r7 r0 1", "al_r7_r0_1"},
547 {{al, r7, r0, 2}, false, al, "al r7 r0 2", "al_r7_r0_2"},
548 {{al, r7, r0, 3}, false, al, "al r7 r0 3", "al_r7_r0_3"},
549 {{al, r7, r0, 4}, false, al, "al r7 r0 4", "al_r7_r0_4"},
550 {{al, r7, r0, 5}, false, al, "al r7 r0 5", "al_r7_r0_5"},
551 {{al, r7, r0, 6}, false, al, "al r7 r0 6", "al_r7_r0_6"},
552 {{al, r7, r0, 7}, false, al, "al r7 r0 7", "al_r7_r0_7"},
553 {{al, r7, r1, 0}, false, al, "al r7 r1 0", "al_r7_r1_0"},
554 {{al, r7, r1, 1}, false, al, "al r7 r1 1", "al_r7_r1_1"},
555 {{al, r7, r1, 2}, false, al, "al r7 r1 2", "al_r7_r1_2"},
556 {{al, r7, r1, 3}, false, al, "al r7 r1 3", "al_r7_r1_3"},
557 {{al, r7, r1, 4}, false, al, "al r7 r1 4", "al_r7_r1_4"},
558 {{al, r7, r1, 5}, false, al, "al r7 r1 5", "al_r7_r1_5"},
559 {{al, r7, r1, 6}, false, al, "al r7 r1 6", "al_r7_r1_6"},
560 {{al, r7, r1, 7}, false, al, "al r7 r1 7", "al_r7_r1_7"},
561 {{al, r7, r2, 0}, false, al, "al r7 r2 0", "al_r7_r2_0"},
562 {{al, r7, r2, 1}, false, al, "al r7 r2 1", "al_r7_r2_1"},
563 {{al, r7, r2, 2}, false, al, "al r7 r2 2", "al_r7_r2_2"},
564 {{al, r7, r2, 3}, false, al, "al r7 r2 3", "al_r7_r2_3"},
565 {{al, r7, r2, 4}, false, al, "al r7 r2 4", "al_r7_r2_4"},
566 {{al, r7, r2, 5}, false, al, "al r7 r2 5", "al_r7_r2_5"},
567 {{al, r7, r2, 6}, false, al, "al r7 r2 6", "al_r7_r2_6"},
568 {{al, r7, r2, 7}, false, al, "al r7 r2 7", "al_r7_r2_7"},
569 {{al, r7, r3, 0}, false, al, "al r7 r3 0", "al_r7_r3_0"},
570 {{al, r7, r3, 1}, false, al, "al r7 r3 1", "al_r7_r3_1"},
571 {{al, r7, r3, 2}, false, al, "al r7 r3 2", "al_r7_r3_2"},
572 {{al, r7, r3, 3}, false, al, "al r7 r3 3", "al_r7_r3_3"},
573 {{al, r7, r3, 4}, false, al, "al r7 r3 4", "al_r7_r3_4"},
574 {{al, r7, r3, 5}, false, al, "al r7 r3 5", "al_r7_r3_5"},
575 {{al, r7, r3, 6}, false, al, "al r7 r3 6", "al_r7_r3_6"},
576 {{al, r7, r3, 7}, false, al, "al r7 r3 7", "al_r7_r3_7"},
577 {{al, r7, r4, 0}, false, al, "al r7 r4 0", "al_r7_r4_0"},
578 {{al, r7, r4, 1}, false, al, "al r7 r4 1", "al_r7_r4_1"},
579 {{al, r7, r4, 2}, false, al, "al r7 r4 2", "al_r7_r4_2"},
580 {{al, r7, r4, 3}, false, al, "al r7 r4 3", "al_r7_r4_3"},
581 {{al, r7, r4, 4}, false, al, "al r7 r4 4", "al_r7_r4_4"},
582 {{al, r7, r4, 5}, false, al, "al r7 r4 5", "al_r7_r4_5"},
583 {{al, r7, r4, 6}, false, al, "al r7 r4 6", "al_r7_r4_6"},
584 {{al, r7, r4, 7}, false, al, "al r7 r4 7", "al_r7_r4_7"},
585 {{al, r7, r5, 0}, false, al, "al r7 r5 0", "al_r7_r5_0"},
586 {{al, r7, r5, 1}, false, al, "al r7 r5 1", "al_r7_r5_1"},
587 {{al, r7, r5, 2}, false, al, "al r7 r5 2", "al_r7_r5_2"},
588 {{al, r7, r5, 3}, false, al, "al r7 r5 3", "al_r7_r5_3"},
589 {{al, r7, r5, 4}, false, al, "al r7 r5 4", "al_r7_r5_4"},
590 {{al, r7, r5, 5}, false, al, "al r7 r5 5", "al_r7_r5_5"},
591 {{al, r7, r5, 6}, false, al, "al r7 r5 6", "al_r7_r5_6"},
592 {{al, r7, r5, 7}, false, al, "al r7 r5 7", "al_r7_r5_7"},
593 {{al, r7, r6, 0}, false, al, "al r7 r6 0", "al_r7_r6_0"},
594 {{al, r7, r6, 1}, false, al, "al r7 r6 1", "al_r7_r6_1"},
595 {{al, r7, r6, 2}, false, al, "al r7 r6 2", "al_r7_r6_2"},
596 {{al, r7, r6, 3}, false, al, "al r7 r6 3", "al_r7_r6_3"},
597 {{al, r7, r6, 4}, false, al, "al r7 r6 4", "al_r7_r6_4"},
598 {{al, r7, r6, 5}, false, al, "al r7 r6 5", "al_r7_r6_5"},
599 {{al, r7, r6, 6}, false, al, "al r7 r6 6", "al_r7_r6_6"},
600 {{al, r7, r6, 7}, false, al, "al r7 r6 7", "al_r7_r6_7"},
601 {{al, r7, r7, 0}, false, al, "al r7 r7 0", "al_r7_r7_0"},
602 {{al, r7, r7, 1}, false, al, "al r7 r7 1", "al_r7_r7_1"},
603 {{al, r7, r7, 2}, false, al, "al r7 r7 2", "al_r7_r7_2"},
604 {{al, r7, r7, 3}, false, al, "al r7 r7 3", "al_r7_r7_3"},
605 {{al, r7, r7, 4}, false, al, "al r7 r7 4", "al_r7_r7_4"},
606 {{al, r7, r7, 5}, false, al, "al r7 r7 5", "al_r7_r7_5"},
607 {{al, r7, r7, 6}, false, al, "al r7 r7 6", "al_r7_r7_6"},
608 {{al, r7, r7, 7}, false, al, "al r7 r7 7", "al_r7_r7_7"}};
609
610 // These headers each contain an array of `TestResult` with the reference output
611 // values. The reference arrays are names `kReference{mnemonic}`.
612 #include "aarch32/traces/assembler-cond-rdlow-rnlow-operand-immediate-imm3-adds-t32.h"
613 #include "aarch32/traces/assembler-cond-rdlow-rnlow-operand-immediate-imm3-subs-t32.h"
614
615
616 // The maximum number of errors to report in detail for each test.
617 const unsigned kErrorReportLimit = 8;
618
619 typedef void (MacroAssembler::*Fn)(Condition cond,
620 Register rd,
621 Register rn,
622 const Operand& op);
623
TestHelper(Fn instruction,const char * mnemonic,const TestResult reference[])624 void TestHelper(Fn instruction,
625 const char* mnemonic,
626 const TestResult reference[]) {
627 unsigned total_error_count = 0;
628 MacroAssembler masm(BUF_SIZE);
629
630 masm.UseT32();
631
632 for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
633 // Values to pass to the macro-assembler.
634 Condition cond = kTests[i].operands.cond;
635 Register rd = kTests[i].operands.rd;
636 Register rn = kTests[i].operands.rn;
637 int32_t immediate = kTests[i].operands.immediate;
638 Operand op(immediate);
639
640 int32_t start = masm.GetCursorOffset();
641 {
642 // We never generate more that 4 bytes, as IT instructions are only
643 // allowed for narrow encodings.
644 ExactAssemblyScope scope(&masm, 4, ExactAssemblyScope::kMaximumSize);
645 if (kTests[i].in_it_block) {
646 masm.it(kTests[i].it_condition);
647 }
648 (masm.*instruction)(cond, rd, rn, op);
649 }
650 int32_t end = masm.GetCursorOffset();
651
652 const byte* result_ptr =
653 masm.GetBuffer()->GetOffsetAddress<const byte*>(start);
654 VIXL_ASSERT(start < end);
655 uint32_t result_size = end - start;
656
657 if (Test::generate_test_trace()) {
658 // Print the result bytes.
659 printf("const byte kInstruction_%s_%s[] = {\n",
660 mnemonic,
661 kTests[i].identifier);
662 for (uint32_t j = 0; j < result_size; j++) {
663 if (j == 0) {
664 printf(" 0x%02" PRIx8, result_ptr[j]);
665 } else {
666 printf(", 0x%02" PRIx8, result_ptr[j]);
667 }
668 }
669 // This comment is meant to be used by external tools to validate
670 // the encoding. We can parse the comment to figure out what
671 // instruction this corresponds to.
672 if (kTests[i].in_it_block) {
673 printf(" // It %s; %s %s\n};\n",
674 kTests[i].it_condition.GetName(),
675 mnemonic,
676 kTests[i].operands_description);
677 } else {
678 printf(" // %s %s\n};\n", mnemonic, kTests[i].operands_description);
679 }
680 } else {
681 // Check we've emitted the exact same encoding as present in the
682 // trace file. Only print up to `kErrorReportLimit` errors.
683 if (((result_size != reference[i].size) ||
684 (memcmp(result_ptr, reference[i].encoding, reference[i].size) !=
685 0)) &&
686 (++total_error_count <= kErrorReportLimit)) {
687 printf("Error when testing \"%s\" with operands \"%s\":\n",
688 mnemonic,
689 kTests[i].operands_description);
690 printf(" Expected: ");
691 for (uint32_t j = 0; j < reference[i].size; j++) {
692 if (j == 0) {
693 printf("0x%02" PRIx8, reference[i].encoding[j]);
694 } else {
695 printf(", 0x%02" PRIx8, reference[i].encoding[j]);
696 }
697 }
698 printf("\n");
699 printf(" Found: ");
700 for (uint32_t j = 0; j < result_size; j++) {
701 if (j == 0) {
702 printf("0x%02" PRIx8, result_ptr[j]);
703 } else {
704 printf(", 0x%02" PRIx8, result_ptr[j]);
705 }
706 }
707 printf("\n");
708 }
709 }
710 }
711
712 masm.FinalizeCode();
713
714 if (Test::generate_test_trace()) {
715 // Finalize the trace file by writing the final `TestResult` array
716 // which links all generated instruction encodings.
717 printf("const TestResult kReference%s[] = {\n", mnemonic);
718 for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
719 printf(" {\n");
720 printf(" ARRAY_SIZE(kInstruction_%s_%s),\n",
721 mnemonic,
722 kTests[i].identifier);
723 printf(" kInstruction_%s_%s,\n", mnemonic, kTests[i].identifier);
724 printf(" },\n");
725 }
726 printf("};\n");
727 } else {
728 if (total_error_count > kErrorReportLimit) {
729 printf("%u other errors follow.\n",
730 total_error_count - kErrorReportLimit);
731 }
732 // Crash if the test failed.
733 VIXL_CHECK(total_error_count == 0);
734 }
735 }
736
737 // Instantiate tests for each instruction in the list.
738 #define TEST(mnemonic) \
739 void Test_##mnemonic() { \
740 TestHelper(&MacroAssembler::mnemonic, #mnemonic, kReference##mnemonic); \
741 } \
742 Test test_##mnemonic( \
743 "AARCH32_ASSEMBLER_COND_RDLOW_RNLOW_OPERAND_IMMEDIATE_IMM3_" #mnemonic \
744 "_T32", \
745 &Test_##mnemonic);
746 FOREACH_INSTRUCTION(TEST)
747 #undef TEST
748
749 } // namespace
750 #endif
751
752 } // namespace aarch32
753 } // namespace vixl
754