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-simulator-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 #include "aarch32/disasm-aarch32.h"
45 
46 #define __ masm.
47 #define BUF_SIZE (4096)
48 
49 #ifdef VIXL_INCLUDE_SIMULATOR_AARCH32
50 // Run tests with the simulator.
51 
52 #define SETUP() MacroAssembler masm(BUF_SIZE)
53 
54 #define START() masm.GetBuffer()->Reset()
55 
56 #define END() \
57   __ Hlt(0);  \
58   __ FinalizeCode();
59 
60 // TODO: Run the tests in the simulator.
61 #define RUN()
62 
63 #define TEARDOWN()
64 
65 #else  // ifdef VIXL_INCLUDE_SIMULATOR_AARCH32.
66 
67 #define SETUP()                                   \
68   MacroAssembler masm(BUF_SIZE);                  \
69   UseScratchRegisterScope harness_scratch(&masm); \
70   harness_scratch.ExcludeAll();
71 
72 #define START()              \
73   masm.GetBuffer()->Reset(); \
74   __ Push(r4);               \
75   __ Push(r5);               \
76   __ Push(r6);               \
77   __ Push(r7);               \
78   __ Push(r8);               \
79   __ Push(r9);               \
80   __ Push(r10);              \
81   __ Push(r11);              \
82   __ Push(lr);               \
83   harness_scratch.Include(ip);
84 
85 #define END()                  \
86   harness_scratch.Exclude(ip); \
87   __ Pop(lr);                  \
88   __ Pop(r11);                 \
89   __ Pop(r10);                 \
90   __ Pop(r9);                  \
91   __ Pop(r8);                  \
92   __ Pop(r7);                  \
93   __ Pop(r6);                  \
94   __ Pop(r5);                  \
95   __ Pop(r4);                  \
96   __ Bx(lr);                   \
97   __ FinalizeCode();
98 
99 #define RUN()                                                 \
100   {                                                           \
101     int pcs_offset = masm.IsUsingT32() ? 1 : 0;               \
102     masm.GetBuffer()->SetExecutable();                        \
103     ExecuteMemory(masm.GetBuffer()->GetStartAddress<byte*>(), \
104                   masm.GetSizeOfCodeGenerated(),              \
105                   pcs_offset);                                \
106     masm.GetBuffer()->SetWritable();                          \
107   }
108 
109 #define TEARDOWN() harness_scratch.Close();
110 
111 #endif  // ifdef VIXL_INCLUDE_SIMULATOR_AARCH32
112 
113 namespace vixl {
114 namespace aarch32 {
115 
116 // List of instruction encodings:
117 #define FOREACH_INSTRUCTION(M) \
118   M(Adc)                       \
119   M(Adcs)                      \
120   M(Add)                       \
121   M(Adds)                      \
122   M(And)                       \
123   M(Ands)                      \
124   M(Bic)                       \
125   M(Bics)                      \
126   M(Eor)                       \
127   M(Eors)                      \
128   M(Orn)                       \
129   M(Orns)                      \
130   M(Orr)                       \
131   M(Orrs)                      \
132   M(Rsb)                       \
133   M(Rsbs)                      \
134   M(Sbc)                       \
135   M(Sbcs)                      \
136   M(Sub)                       \
137   M(Subs)
138 
139 
140 // The following definitions are defined again in each generated test, therefore
141 // we need to place them in an anomymous namespace. It expresses that they are
142 // local to this file only, and the compiler is not allowed to share these types
143 // across test files during template instantiation. Specifically, `Operands` and
144 // `Inputs` have various layouts across generated tests so they absolutely
145 // cannot be shared.
146 
147 #ifdef VIXL_INCLUDE_TARGET_T32
148 namespace {
149 
150 // Values to be passed to the assembler to produce the instruction under test.
151 struct Operands {
152   Condition cond;
153   Register rd;
154   Register rn;
155   uint32_t immediate;
156 };
157 
158 // Input data to feed to the instruction.
159 struct Inputs {
160   uint32_t apsr;
161   uint32_t rd;
162   uint32_t rn;
163 };
164 
165 // This structure contains all input data needed to test one specific encoding.
166 // It used to generate a loop over an instruction.
167 struct TestLoopData {
168   // The `operands` fields represents the values to pass to the assembler to
169   // produce the instruction.
170   Operands operands;
171   // Description of the operands, used for error reporting.
172   const char* operands_description;
173   // Unique identifier, used for generating traces.
174   const char* identifier;
175   // Array of values to be fed to the instruction.
176   size_t input_size;
177   const Inputs* inputs;
178 };
179 
180 static const Inputs kRdIsRn[] = {{NoFlag, 0x00000000, 0x00000000},
181                                  {NoFlag, 0x00000001, 0x00000001},
182                                  {NoFlag, 0x00000002, 0x00000002},
183                                  {NoFlag, 0x00000020, 0x00000020},
184                                  {NoFlag, 0x0000007d, 0x0000007d},
185                                  {NoFlag, 0x0000007e, 0x0000007e},
186                                  {NoFlag, 0x0000007f, 0x0000007f},
187                                  {NoFlag, 0x00007ffd, 0x00007ffd},
188                                  {NoFlag, 0x00007ffe, 0x00007ffe},
189                                  {NoFlag, 0x00007fff, 0x00007fff},
190                                  {NoFlag, 0x33333333, 0x33333333},
191                                  {NoFlag, 0x55555555, 0x55555555},
192                                  {NoFlag, 0x7ffffffd, 0x7ffffffd},
193                                  {NoFlag, 0x7ffffffe, 0x7ffffffe},
194                                  {NoFlag, 0x7fffffff, 0x7fffffff},
195                                  {NoFlag, 0x80000000, 0x80000000},
196                                  {NoFlag, 0x80000001, 0x80000001},
197                                  {NoFlag, 0xaaaaaaaa, 0xaaaaaaaa},
198                                  {NoFlag, 0xcccccccc, 0xcccccccc},
199                                  {NoFlag, 0xffff8000, 0xffff8000},
200                                  {NoFlag, 0xffff8001, 0xffff8001},
201                                  {NoFlag, 0xffff8002, 0xffff8002},
202                                  {NoFlag, 0xffff8003, 0xffff8003},
203                                  {NoFlag, 0xffffff80, 0xffffff80},
204                                  {NoFlag, 0xffffff81, 0xffffff81},
205                                  {NoFlag, 0xffffff82, 0xffffff82},
206                                  {NoFlag, 0xffffff83, 0xffffff83},
207                                  {NoFlag, 0xffffffe0, 0xffffffe0},
208                                  {NoFlag, 0xfffffffd, 0xfffffffd},
209                                  {NoFlag, 0xfffffffe, 0xfffffffe},
210                                  {NoFlag, 0xffffffff, 0xffffffff}};
211 
212 static const Inputs kRdIsNotRn[] = {{NoFlag, 0x00000000, 0x00000000},
213                                     {NoFlag, 0x00000000, 0x00000001},
214                                     {NoFlag, 0x00000000, 0x00000002},
215                                     {NoFlag, 0x00000000, 0x00000020},
216                                     {NoFlag, 0x00000000, 0x0000007d},
217                                     {NoFlag, 0x00000000, 0x0000007e},
218                                     {NoFlag, 0x00000000, 0x0000007f},
219                                     {NoFlag, 0x00000000, 0x00007ffd},
220                                     {NoFlag, 0x00000000, 0x00007ffe},
221                                     {NoFlag, 0x00000000, 0x00007fff},
222                                     {NoFlag, 0x00000000, 0x33333333},
223                                     {NoFlag, 0x00000000, 0x55555555},
224                                     {NoFlag, 0x00000000, 0x7ffffffd},
225                                     {NoFlag, 0x00000000, 0x7ffffffe},
226                                     {NoFlag, 0x00000000, 0x7fffffff},
227                                     {NoFlag, 0x00000000, 0x80000000},
228                                     {NoFlag, 0x00000000, 0x80000001},
229                                     {NoFlag, 0x00000000, 0xaaaaaaaa},
230                                     {NoFlag, 0x00000000, 0xcccccccc},
231                                     {NoFlag, 0x00000000, 0xffff8000},
232                                     {NoFlag, 0x00000000, 0xffff8001},
233                                     {NoFlag, 0x00000000, 0xffff8002},
234                                     {NoFlag, 0x00000000, 0xffff8003},
235                                     {NoFlag, 0x00000000, 0xffffff80},
236                                     {NoFlag, 0x00000000, 0xffffff81},
237                                     {NoFlag, 0x00000000, 0xffffff82},
238                                     {NoFlag, 0x00000000, 0xffffff83},
239                                     {NoFlag, 0x00000000, 0xffffffe0},
240                                     {NoFlag, 0x00000000, 0xfffffffd},
241                                     {NoFlag, 0x00000000, 0xfffffffe},
242                                     {NoFlag, 0x00000000, 0xffffffff},
243                                     {NoFlag, 0x00000001, 0x00000000},
244                                     {NoFlag, 0x00000001, 0x00000001},
245                                     {NoFlag, 0x00000001, 0x00000002},
246                                     {NoFlag, 0x00000001, 0x00000020},
247                                     {NoFlag, 0x00000001, 0x0000007d},
248                                     {NoFlag, 0x00000001, 0x0000007e},
249                                     {NoFlag, 0x00000001, 0x0000007f},
250                                     {NoFlag, 0x00000001, 0x00007ffd},
251                                     {NoFlag, 0x00000001, 0x00007ffe},
252                                     {NoFlag, 0x00000001, 0x00007fff},
253                                     {NoFlag, 0x00000001, 0x33333333},
254                                     {NoFlag, 0x00000001, 0x55555555},
255                                     {NoFlag, 0x00000001, 0x7ffffffd},
256                                     {NoFlag, 0x00000001, 0x7ffffffe},
257                                     {NoFlag, 0x00000001, 0x7fffffff},
258                                     {NoFlag, 0x00000001, 0x80000000},
259                                     {NoFlag, 0x00000001, 0x80000001},
260                                     {NoFlag, 0x00000001, 0xaaaaaaaa},
261                                     {NoFlag, 0x00000001, 0xcccccccc},
262                                     {NoFlag, 0x00000001, 0xffff8000},
263                                     {NoFlag, 0x00000001, 0xffff8001},
264                                     {NoFlag, 0x00000001, 0xffff8002},
265                                     {NoFlag, 0x00000001, 0xffff8003},
266                                     {NoFlag, 0x00000001, 0xffffff80},
267                                     {NoFlag, 0x00000001, 0xffffff81},
268                                     {NoFlag, 0x00000001, 0xffffff82},
269                                     {NoFlag, 0x00000001, 0xffffff83},
270                                     {NoFlag, 0x00000001, 0xffffffe0},
271                                     {NoFlag, 0x00000001, 0xfffffffd},
272                                     {NoFlag, 0x00000001, 0xfffffffe},
273                                     {NoFlag, 0x00000001, 0xffffffff},
274                                     {NoFlag, 0x00000002, 0x00000000},
275                                     {NoFlag, 0x00000002, 0x00000001},
276                                     {NoFlag, 0x00000002, 0x00000002},
277                                     {NoFlag, 0x00000002, 0x00000020},
278                                     {NoFlag, 0x00000002, 0x0000007d},
279                                     {NoFlag, 0x00000002, 0x0000007e},
280                                     {NoFlag, 0x00000002, 0x0000007f},
281                                     {NoFlag, 0x00000002, 0x00007ffd},
282                                     {NoFlag, 0x00000002, 0x00007ffe},
283                                     {NoFlag, 0x00000002, 0x00007fff},
284                                     {NoFlag, 0x00000002, 0x33333333},
285                                     {NoFlag, 0x00000002, 0x55555555},
286                                     {NoFlag, 0x00000002, 0x7ffffffd},
287                                     {NoFlag, 0x00000002, 0x7ffffffe},
288                                     {NoFlag, 0x00000002, 0x7fffffff},
289                                     {NoFlag, 0x00000002, 0x80000000},
290                                     {NoFlag, 0x00000002, 0x80000001},
291                                     {NoFlag, 0x00000002, 0xaaaaaaaa},
292                                     {NoFlag, 0x00000002, 0xcccccccc},
293                                     {NoFlag, 0x00000002, 0xffff8000},
294                                     {NoFlag, 0x00000002, 0xffff8001},
295                                     {NoFlag, 0x00000002, 0xffff8002},
296                                     {NoFlag, 0x00000002, 0xffff8003},
297                                     {NoFlag, 0x00000002, 0xffffff80},
298                                     {NoFlag, 0x00000002, 0xffffff81},
299                                     {NoFlag, 0x00000002, 0xffffff82},
300                                     {NoFlag, 0x00000002, 0xffffff83},
301                                     {NoFlag, 0x00000002, 0xffffffe0},
302                                     {NoFlag, 0x00000002, 0xfffffffd},
303                                     {NoFlag, 0x00000002, 0xfffffffe},
304                                     {NoFlag, 0x00000002, 0xffffffff},
305                                     {NoFlag, 0x00000020, 0x00000000},
306                                     {NoFlag, 0x00000020, 0x00000001},
307                                     {NoFlag, 0x00000020, 0x00000002},
308                                     {NoFlag, 0x00000020, 0x00000020},
309                                     {NoFlag, 0x00000020, 0x0000007d},
310                                     {NoFlag, 0x00000020, 0x0000007e},
311                                     {NoFlag, 0x00000020, 0x0000007f},
312                                     {NoFlag, 0x00000020, 0x00007ffd},
313                                     {NoFlag, 0x00000020, 0x00007ffe},
314                                     {NoFlag, 0x00000020, 0x00007fff},
315                                     {NoFlag, 0x00000020, 0x33333333},
316                                     {NoFlag, 0x00000020, 0x55555555},
317                                     {NoFlag, 0x00000020, 0x7ffffffd},
318                                     {NoFlag, 0x00000020, 0x7ffffffe},
319                                     {NoFlag, 0x00000020, 0x7fffffff},
320                                     {NoFlag, 0x00000020, 0x80000000},
321                                     {NoFlag, 0x00000020, 0x80000001},
322                                     {NoFlag, 0x00000020, 0xaaaaaaaa},
323                                     {NoFlag, 0x00000020, 0xcccccccc},
324                                     {NoFlag, 0x00000020, 0xffff8000},
325                                     {NoFlag, 0x00000020, 0xffff8001},
326                                     {NoFlag, 0x00000020, 0xffff8002},
327                                     {NoFlag, 0x00000020, 0xffff8003},
328                                     {NoFlag, 0x00000020, 0xffffff80},
329                                     {NoFlag, 0x00000020, 0xffffff81},
330                                     {NoFlag, 0x00000020, 0xffffff82},
331                                     {NoFlag, 0x00000020, 0xffffff83},
332                                     {NoFlag, 0x00000020, 0xffffffe0},
333                                     {NoFlag, 0x00000020, 0xfffffffd},
334                                     {NoFlag, 0x00000020, 0xfffffffe},
335                                     {NoFlag, 0x00000020, 0xffffffff},
336                                     {NoFlag, 0x0000007d, 0x00000000},
337                                     {NoFlag, 0x0000007d, 0x00000001},
338                                     {NoFlag, 0x0000007d, 0x00000002},
339                                     {NoFlag, 0x0000007d, 0x00000020},
340                                     {NoFlag, 0x0000007d, 0x0000007d},
341                                     {NoFlag, 0x0000007d, 0x0000007e},
342                                     {NoFlag, 0x0000007d, 0x0000007f},
343                                     {NoFlag, 0x0000007d, 0x00007ffd},
344                                     {NoFlag, 0x0000007d, 0x00007ffe},
345                                     {NoFlag, 0x0000007d, 0x00007fff},
346                                     {NoFlag, 0x0000007d, 0x33333333},
347                                     {NoFlag, 0x0000007d, 0x55555555},
348                                     {NoFlag, 0x0000007d, 0x7ffffffd},
349                                     {NoFlag, 0x0000007d, 0x7ffffffe},
350                                     {NoFlag, 0x0000007d, 0x7fffffff},
351                                     {NoFlag, 0x0000007d, 0x80000000},
352                                     {NoFlag, 0x0000007d, 0x80000001},
353                                     {NoFlag, 0x0000007d, 0xaaaaaaaa},
354                                     {NoFlag, 0x0000007d, 0xcccccccc},
355                                     {NoFlag, 0x0000007d, 0xffff8000},
356                                     {NoFlag, 0x0000007d, 0xffff8001},
357                                     {NoFlag, 0x0000007d, 0xffff8002},
358                                     {NoFlag, 0x0000007d, 0xffff8003},
359                                     {NoFlag, 0x0000007d, 0xffffff80},
360                                     {NoFlag, 0x0000007d, 0xffffff81},
361                                     {NoFlag, 0x0000007d, 0xffffff82},
362                                     {NoFlag, 0x0000007d, 0xffffff83},
363                                     {NoFlag, 0x0000007d, 0xffffffe0},
364                                     {NoFlag, 0x0000007d, 0xfffffffd},
365                                     {NoFlag, 0x0000007d, 0xfffffffe},
366                                     {NoFlag, 0x0000007d, 0xffffffff},
367                                     {NoFlag, 0x0000007e, 0x00000000},
368                                     {NoFlag, 0x0000007e, 0x00000001},
369                                     {NoFlag, 0x0000007e, 0x00000002},
370                                     {NoFlag, 0x0000007e, 0x00000020},
371                                     {NoFlag, 0x0000007e, 0x0000007d},
372                                     {NoFlag, 0x0000007e, 0x0000007e},
373                                     {NoFlag, 0x0000007e, 0x0000007f},
374                                     {NoFlag, 0x0000007e, 0x00007ffd},
375                                     {NoFlag, 0x0000007e, 0x00007ffe},
376                                     {NoFlag, 0x0000007e, 0x00007fff},
377                                     {NoFlag, 0x0000007e, 0x33333333},
378                                     {NoFlag, 0x0000007e, 0x55555555},
379                                     {NoFlag, 0x0000007e, 0x7ffffffd},
380                                     {NoFlag, 0x0000007e, 0x7ffffffe},
381                                     {NoFlag, 0x0000007e, 0x7fffffff},
382                                     {NoFlag, 0x0000007e, 0x80000000},
383                                     {NoFlag, 0x0000007e, 0x80000001},
384                                     {NoFlag, 0x0000007e, 0xaaaaaaaa},
385                                     {NoFlag, 0x0000007e, 0xcccccccc},
386                                     {NoFlag, 0x0000007e, 0xffff8000},
387                                     {NoFlag, 0x0000007e, 0xffff8001},
388                                     {NoFlag, 0x0000007e, 0xffff8002},
389                                     {NoFlag, 0x0000007e, 0xffff8003},
390                                     {NoFlag, 0x0000007e, 0xffffff80},
391                                     {NoFlag, 0x0000007e, 0xffffff81},
392                                     {NoFlag, 0x0000007e, 0xffffff82},
393                                     {NoFlag, 0x0000007e, 0xffffff83},
394                                     {NoFlag, 0x0000007e, 0xffffffe0},
395                                     {NoFlag, 0x0000007e, 0xfffffffd},
396                                     {NoFlag, 0x0000007e, 0xfffffffe},
397                                     {NoFlag, 0x0000007e, 0xffffffff},
398                                     {NoFlag, 0x0000007f, 0x00000000},
399                                     {NoFlag, 0x0000007f, 0x00000001},
400                                     {NoFlag, 0x0000007f, 0x00000002},
401                                     {NoFlag, 0x0000007f, 0x00000020},
402                                     {NoFlag, 0x0000007f, 0x0000007d},
403                                     {NoFlag, 0x0000007f, 0x0000007e},
404                                     {NoFlag, 0x0000007f, 0x0000007f},
405                                     {NoFlag, 0x0000007f, 0x00007ffd},
406                                     {NoFlag, 0x0000007f, 0x00007ffe},
407                                     {NoFlag, 0x0000007f, 0x00007fff},
408                                     {NoFlag, 0x0000007f, 0x33333333},
409                                     {NoFlag, 0x0000007f, 0x55555555},
410                                     {NoFlag, 0x0000007f, 0x7ffffffd},
411                                     {NoFlag, 0x0000007f, 0x7ffffffe},
412                                     {NoFlag, 0x0000007f, 0x7fffffff},
413                                     {NoFlag, 0x0000007f, 0x80000000},
414                                     {NoFlag, 0x0000007f, 0x80000001},
415                                     {NoFlag, 0x0000007f, 0xaaaaaaaa},
416                                     {NoFlag, 0x0000007f, 0xcccccccc},
417                                     {NoFlag, 0x0000007f, 0xffff8000},
418                                     {NoFlag, 0x0000007f, 0xffff8001},
419                                     {NoFlag, 0x0000007f, 0xffff8002},
420                                     {NoFlag, 0x0000007f, 0xffff8003},
421                                     {NoFlag, 0x0000007f, 0xffffff80},
422                                     {NoFlag, 0x0000007f, 0xffffff81},
423                                     {NoFlag, 0x0000007f, 0xffffff82},
424                                     {NoFlag, 0x0000007f, 0xffffff83},
425                                     {NoFlag, 0x0000007f, 0xffffffe0},
426                                     {NoFlag, 0x0000007f, 0xfffffffd},
427                                     {NoFlag, 0x0000007f, 0xfffffffe},
428                                     {NoFlag, 0x0000007f, 0xffffffff},
429                                     {NoFlag, 0x00007ffd, 0x00000000},
430                                     {NoFlag, 0x00007ffd, 0x00000001},
431                                     {NoFlag, 0x00007ffd, 0x00000002},
432                                     {NoFlag, 0x00007ffd, 0x00000020},
433                                     {NoFlag, 0x00007ffd, 0x0000007d},
434                                     {NoFlag, 0x00007ffd, 0x0000007e},
435                                     {NoFlag, 0x00007ffd, 0x0000007f},
436                                     {NoFlag, 0x00007ffd, 0x00007ffd},
437                                     {NoFlag, 0x00007ffd, 0x00007ffe},
438                                     {NoFlag, 0x00007ffd, 0x00007fff},
439                                     {NoFlag, 0x00007ffd, 0x33333333},
440                                     {NoFlag, 0x00007ffd, 0x55555555},
441                                     {NoFlag, 0x00007ffd, 0x7ffffffd},
442                                     {NoFlag, 0x00007ffd, 0x7ffffffe},
443                                     {NoFlag, 0x00007ffd, 0x7fffffff},
444                                     {NoFlag, 0x00007ffd, 0x80000000},
445                                     {NoFlag, 0x00007ffd, 0x80000001},
446                                     {NoFlag, 0x00007ffd, 0xaaaaaaaa},
447                                     {NoFlag, 0x00007ffd, 0xcccccccc},
448                                     {NoFlag, 0x00007ffd, 0xffff8000},
449                                     {NoFlag, 0x00007ffd, 0xffff8001},
450                                     {NoFlag, 0x00007ffd, 0xffff8002},
451                                     {NoFlag, 0x00007ffd, 0xffff8003},
452                                     {NoFlag, 0x00007ffd, 0xffffff80},
453                                     {NoFlag, 0x00007ffd, 0xffffff81},
454                                     {NoFlag, 0x00007ffd, 0xffffff82},
455                                     {NoFlag, 0x00007ffd, 0xffffff83},
456                                     {NoFlag, 0x00007ffd, 0xffffffe0},
457                                     {NoFlag, 0x00007ffd, 0xfffffffd},
458                                     {NoFlag, 0x00007ffd, 0xfffffffe},
459                                     {NoFlag, 0x00007ffd, 0xffffffff},
460                                     {NoFlag, 0x00007ffe, 0x00000000},
461                                     {NoFlag, 0x00007ffe, 0x00000001},
462                                     {NoFlag, 0x00007ffe, 0x00000002},
463                                     {NoFlag, 0x00007ffe, 0x00000020},
464                                     {NoFlag, 0x00007ffe, 0x0000007d},
465                                     {NoFlag, 0x00007ffe, 0x0000007e},
466                                     {NoFlag, 0x00007ffe, 0x0000007f},
467                                     {NoFlag, 0x00007ffe, 0x00007ffd},
468                                     {NoFlag, 0x00007ffe, 0x00007ffe},
469                                     {NoFlag, 0x00007ffe, 0x00007fff},
470                                     {NoFlag, 0x00007ffe, 0x33333333},
471                                     {NoFlag, 0x00007ffe, 0x55555555},
472                                     {NoFlag, 0x00007ffe, 0x7ffffffd},
473                                     {NoFlag, 0x00007ffe, 0x7ffffffe},
474                                     {NoFlag, 0x00007ffe, 0x7fffffff},
475                                     {NoFlag, 0x00007ffe, 0x80000000},
476                                     {NoFlag, 0x00007ffe, 0x80000001},
477                                     {NoFlag, 0x00007ffe, 0xaaaaaaaa},
478                                     {NoFlag, 0x00007ffe, 0xcccccccc},
479                                     {NoFlag, 0x00007ffe, 0xffff8000},
480                                     {NoFlag, 0x00007ffe, 0xffff8001},
481                                     {NoFlag, 0x00007ffe, 0xffff8002},
482                                     {NoFlag, 0x00007ffe, 0xffff8003},
483                                     {NoFlag, 0x00007ffe, 0xffffff80},
484                                     {NoFlag, 0x00007ffe, 0xffffff81},
485                                     {NoFlag, 0x00007ffe, 0xffffff82},
486                                     {NoFlag, 0x00007ffe, 0xffffff83},
487                                     {NoFlag, 0x00007ffe, 0xffffffe0},
488                                     {NoFlag, 0x00007ffe, 0xfffffffd},
489                                     {NoFlag, 0x00007ffe, 0xfffffffe},
490                                     {NoFlag, 0x00007ffe, 0xffffffff},
491                                     {NoFlag, 0x00007fff, 0x00000000},
492                                     {NoFlag, 0x00007fff, 0x00000001},
493                                     {NoFlag, 0x00007fff, 0x00000002},
494                                     {NoFlag, 0x00007fff, 0x00000020},
495                                     {NoFlag, 0x00007fff, 0x0000007d},
496                                     {NoFlag, 0x00007fff, 0x0000007e},
497                                     {NoFlag, 0x00007fff, 0x0000007f},
498                                     {NoFlag, 0x00007fff, 0x00007ffd},
499                                     {NoFlag, 0x00007fff, 0x00007ffe},
500                                     {NoFlag, 0x00007fff, 0x00007fff},
501                                     {NoFlag, 0x00007fff, 0x33333333},
502                                     {NoFlag, 0x00007fff, 0x55555555},
503                                     {NoFlag, 0x00007fff, 0x7ffffffd},
504                                     {NoFlag, 0x00007fff, 0x7ffffffe},
505                                     {NoFlag, 0x00007fff, 0x7fffffff},
506                                     {NoFlag, 0x00007fff, 0x80000000},
507                                     {NoFlag, 0x00007fff, 0x80000001},
508                                     {NoFlag, 0x00007fff, 0xaaaaaaaa},
509                                     {NoFlag, 0x00007fff, 0xcccccccc},
510                                     {NoFlag, 0x00007fff, 0xffff8000},
511                                     {NoFlag, 0x00007fff, 0xffff8001},
512                                     {NoFlag, 0x00007fff, 0xffff8002},
513                                     {NoFlag, 0x00007fff, 0xffff8003},
514                                     {NoFlag, 0x00007fff, 0xffffff80},
515                                     {NoFlag, 0x00007fff, 0xffffff81},
516                                     {NoFlag, 0x00007fff, 0xffffff82},
517                                     {NoFlag, 0x00007fff, 0xffffff83},
518                                     {NoFlag, 0x00007fff, 0xffffffe0},
519                                     {NoFlag, 0x00007fff, 0xfffffffd},
520                                     {NoFlag, 0x00007fff, 0xfffffffe},
521                                     {NoFlag, 0x00007fff, 0xffffffff},
522                                     {NoFlag, 0x33333333, 0x00000000},
523                                     {NoFlag, 0x33333333, 0x00000001},
524                                     {NoFlag, 0x33333333, 0x00000002},
525                                     {NoFlag, 0x33333333, 0x00000020},
526                                     {NoFlag, 0x33333333, 0x0000007d},
527                                     {NoFlag, 0x33333333, 0x0000007e},
528                                     {NoFlag, 0x33333333, 0x0000007f},
529                                     {NoFlag, 0x33333333, 0x00007ffd},
530                                     {NoFlag, 0x33333333, 0x00007ffe},
531                                     {NoFlag, 0x33333333, 0x00007fff},
532                                     {NoFlag, 0x33333333, 0x33333333},
533                                     {NoFlag, 0x33333333, 0x55555555},
534                                     {NoFlag, 0x33333333, 0x7ffffffd},
535                                     {NoFlag, 0x33333333, 0x7ffffffe},
536                                     {NoFlag, 0x33333333, 0x7fffffff},
537                                     {NoFlag, 0x33333333, 0x80000000},
538                                     {NoFlag, 0x33333333, 0x80000001},
539                                     {NoFlag, 0x33333333, 0xaaaaaaaa},
540                                     {NoFlag, 0x33333333, 0xcccccccc},
541                                     {NoFlag, 0x33333333, 0xffff8000},
542                                     {NoFlag, 0x33333333, 0xffff8001},
543                                     {NoFlag, 0x33333333, 0xffff8002},
544                                     {NoFlag, 0x33333333, 0xffff8003},
545                                     {NoFlag, 0x33333333, 0xffffff80},
546                                     {NoFlag, 0x33333333, 0xffffff81},
547                                     {NoFlag, 0x33333333, 0xffffff82},
548                                     {NoFlag, 0x33333333, 0xffffff83},
549                                     {NoFlag, 0x33333333, 0xffffffe0},
550                                     {NoFlag, 0x33333333, 0xfffffffd},
551                                     {NoFlag, 0x33333333, 0xfffffffe},
552                                     {NoFlag, 0x33333333, 0xffffffff},
553                                     {NoFlag, 0x55555555, 0x00000000},
554                                     {NoFlag, 0x55555555, 0x00000001},
555                                     {NoFlag, 0x55555555, 0x00000002},
556                                     {NoFlag, 0x55555555, 0x00000020},
557                                     {NoFlag, 0x55555555, 0x0000007d},
558                                     {NoFlag, 0x55555555, 0x0000007e},
559                                     {NoFlag, 0x55555555, 0x0000007f},
560                                     {NoFlag, 0x55555555, 0x00007ffd},
561                                     {NoFlag, 0x55555555, 0x00007ffe},
562                                     {NoFlag, 0x55555555, 0x00007fff},
563                                     {NoFlag, 0x55555555, 0x33333333},
564                                     {NoFlag, 0x55555555, 0x55555555},
565                                     {NoFlag, 0x55555555, 0x7ffffffd},
566                                     {NoFlag, 0x55555555, 0x7ffffffe},
567                                     {NoFlag, 0x55555555, 0x7fffffff},
568                                     {NoFlag, 0x55555555, 0x80000000},
569                                     {NoFlag, 0x55555555, 0x80000001},
570                                     {NoFlag, 0x55555555, 0xaaaaaaaa},
571                                     {NoFlag, 0x55555555, 0xcccccccc},
572                                     {NoFlag, 0x55555555, 0xffff8000},
573                                     {NoFlag, 0x55555555, 0xffff8001},
574                                     {NoFlag, 0x55555555, 0xffff8002},
575                                     {NoFlag, 0x55555555, 0xffff8003},
576                                     {NoFlag, 0x55555555, 0xffffff80},
577                                     {NoFlag, 0x55555555, 0xffffff81},
578                                     {NoFlag, 0x55555555, 0xffffff82},
579                                     {NoFlag, 0x55555555, 0xffffff83},
580                                     {NoFlag, 0x55555555, 0xffffffe0},
581                                     {NoFlag, 0x55555555, 0xfffffffd},
582                                     {NoFlag, 0x55555555, 0xfffffffe},
583                                     {NoFlag, 0x55555555, 0xffffffff},
584                                     {NoFlag, 0x7ffffffd, 0x00000000},
585                                     {NoFlag, 0x7ffffffd, 0x00000001},
586                                     {NoFlag, 0x7ffffffd, 0x00000002},
587                                     {NoFlag, 0x7ffffffd, 0x00000020},
588                                     {NoFlag, 0x7ffffffd, 0x0000007d},
589                                     {NoFlag, 0x7ffffffd, 0x0000007e},
590                                     {NoFlag, 0x7ffffffd, 0x0000007f},
591                                     {NoFlag, 0x7ffffffd, 0x00007ffd},
592                                     {NoFlag, 0x7ffffffd, 0x00007ffe},
593                                     {NoFlag, 0x7ffffffd, 0x00007fff},
594                                     {NoFlag, 0x7ffffffd, 0x33333333},
595                                     {NoFlag, 0x7ffffffd, 0x55555555},
596                                     {NoFlag, 0x7ffffffd, 0x7ffffffd},
597                                     {NoFlag, 0x7ffffffd, 0x7ffffffe},
598                                     {NoFlag, 0x7ffffffd, 0x7fffffff},
599                                     {NoFlag, 0x7ffffffd, 0x80000000},
600                                     {NoFlag, 0x7ffffffd, 0x80000001},
601                                     {NoFlag, 0x7ffffffd, 0xaaaaaaaa},
602                                     {NoFlag, 0x7ffffffd, 0xcccccccc},
603                                     {NoFlag, 0x7ffffffd, 0xffff8000},
604                                     {NoFlag, 0x7ffffffd, 0xffff8001},
605                                     {NoFlag, 0x7ffffffd, 0xffff8002},
606                                     {NoFlag, 0x7ffffffd, 0xffff8003},
607                                     {NoFlag, 0x7ffffffd, 0xffffff80},
608                                     {NoFlag, 0x7ffffffd, 0xffffff81},
609                                     {NoFlag, 0x7ffffffd, 0xffffff82},
610                                     {NoFlag, 0x7ffffffd, 0xffffff83},
611                                     {NoFlag, 0x7ffffffd, 0xffffffe0},
612                                     {NoFlag, 0x7ffffffd, 0xfffffffd},
613                                     {NoFlag, 0x7ffffffd, 0xfffffffe},
614                                     {NoFlag, 0x7ffffffd, 0xffffffff},
615                                     {NoFlag, 0x7ffffffe, 0x00000000},
616                                     {NoFlag, 0x7ffffffe, 0x00000001},
617                                     {NoFlag, 0x7ffffffe, 0x00000002},
618                                     {NoFlag, 0x7ffffffe, 0x00000020},
619                                     {NoFlag, 0x7ffffffe, 0x0000007d},
620                                     {NoFlag, 0x7ffffffe, 0x0000007e},
621                                     {NoFlag, 0x7ffffffe, 0x0000007f},
622                                     {NoFlag, 0x7ffffffe, 0x00007ffd},
623                                     {NoFlag, 0x7ffffffe, 0x00007ffe},
624                                     {NoFlag, 0x7ffffffe, 0x00007fff},
625                                     {NoFlag, 0x7ffffffe, 0x33333333},
626                                     {NoFlag, 0x7ffffffe, 0x55555555},
627                                     {NoFlag, 0x7ffffffe, 0x7ffffffd},
628                                     {NoFlag, 0x7ffffffe, 0x7ffffffe},
629                                     {NoFlag, 0x7ffffffe, 0x7fffffff},
630                                     {NoFlag, 0x7ffffffe, 0x80000000},
631                                     {NoFlag, 0x7ffffffe, 0x80000001},
632                                     {NoFlag, 0x7ffffffe, 0xaaaaaaaa},
633                                     {NoFlag, 0x7ffffffe, 0xcccccccc},
634                                     {NoFlag, 0x7ffffffe, 0xffff8000},
635                                     {NoFlag, 0x7ffffffe, 0xffff8001},
636                                     {NoFlag, 0x7ffffffe, 0xffff8002},
637                                     {NoFlag, 0x7ffffffe, 0xffff8003},
638                                     {NoFlag, 0x7ffffffe, 0xffffff80},
639                                     {NoFlag, 0x7ffffffe, 0xffffff81},
640                                     {NoFlag, 0x7ffffffe, 0xffffff82},
641                                     {NoFlag, 0x7ffffffe, 0xffffff83},
642                                     {NoFlag, 0x7ffffffe, 0xffffffe0},
643                                     {NoFlag, 0x7ffffffe, 0xfffffffd},
644                                     {NoFlag, 0x7ffffffe, 0xfffffffe},
645                                     {NoFlag, 0x7ffffffe, 0xffffffff},
646                                     {NoFlag, 0x7fffffff, 0x00000000},
647                                     {NoFlag, 0x7fffffff, 0x00000001},
648                                     {NoFlag, 0x7fffffff, 0x00000002},
649                                     {NoFlag, 0x7fffffff, 0x00000020},
650                                     {NoFlag, 0x7fffffff, 0x0000007d},
651                                     {NoFlag, 0x7fffffff, 0x0000007e},
652                                     {NoFlag, 0x7fffffff, 0x0000007f},
653                                     {NoFlag, 0x7fffffff, 0x00007ffd},
654                                     {NoFlag, 0x7fffffff, 0x00007ffe},
655                                     {NoFlag, 0x7fffffff, 0x00007fff},
656                                     {NoFlag, 0x7fffffff, 0x33333333},
657                                     {NoFlag, 0x7fffffff, 0x55555555},
658                                     {NoFlag, 0x7fffffff, 0x7ffffffd},
659                                     {NoFlag, 0x7fffffff, 0x7ffffffe},
660                                     {NoFlag, 0x7fffffff, 0x7fffffff},
661                                     {NoFlag, 0x7fffffff, 0x80000000},
662                                     {NoFlag, 0x7fffffff, 0x80000001},
663                                     {NoFlag, 0x7fffffff, 0xaaaaaaaa},
664                                     {NoFlag, 0x7fffffff, 0xcccccccc},
665                                     {NoFlag, 0x7fffffff, 0xffff8000},
666                                     {NoFlag, 0x7fffffff, 0xffff8001},
667                                     {NoFlag, 0x7fffffff, 0xffff8002},
668                                     {NoFlag, 0x7fffffff, 0xffff8003},
669                                     {NoFlag, 0x7fffffff, 0xffffff80},
670                                     {NoFlag, 0x7fffffff, 0xffffff81},
671                                     {NoFlag, 0x7fffffff, 0xffffff82},
672                                     {NoFlag, 0x7fffffff, 0xffffff83},
673                                     {NoFlag, 0x7fffffff, 0xffffffe0},
674                                     {NoFlag, 0x7fffffff, 0xfffffffd},
675                                     {NoFlag, 0x7fffffff, 0xfffffffe},
676                                     {NoFlag, 0x7fffffff, 0xffffffff},
677                                     {NoFlag, 0x80000000, 0x00000000},
678                                     {NoFlag, 0x80000000, 0x00000001},
679                                     {NoFlag, 0x80000000, 0x00000002},
680                                     {NoFlag, 0x80000000, 0x00000020},
681                                     {NoFlag, 0x80000000, 0x0000007d},
682                                     {NoFlag, 0x80000000, 0x0000007e},
683                                     {NoFlag, 0x80000000, 0x0000007f},
684                                     {NoFlag, 0x80000000, 0x00007ffd},
685                                     {NoFlag, 0x80000000, 0x00007ffe},
686                                     {NoFlag, 0x80000000, 0x00007fff},
687                                     {NoFlag, 0x80000000, 0x33333333},
688                                     {NoFlag, 0x80000000, 0x55555555},
689                                     {NoFlag, 0x80000000, 0x7ffffffd},
690                                     {NoFlag, 0x80000000, 0x7ffffffe},
691                                     {NoFlag, 0x80000000, 0x7fffffff},
692                                     {NoFlag, 0x80000000, 0x80000000},
693                                     {NoFlag, 0x80000000, 0x80000001},
694                                     {NoFlag, 0x80000000, 0xaaaaaaaa},
695                                     {NoFlag, 0x80000000, 0xcccccccc},
696                                     {NoFlag, 0x80000000, 0xffff8000},
697                                     {NoFlag, 0x80000000, 0xffff8001},
698                                     {NoFlag, 0x80000000, 0xffff8002},
699                                     {NoFlag, 0x80000000, 0xffff8003},
700                                     {NoFlag, 0x80000000, 0xffffff80},
701                                     {NoFlag, 0x80000000, 0xffffff81},
702                                     {NoFlag, 0x80000000, 0xffffff82},
703                                     {NoFlag, 0x80000000, 0xffffff83},
704                                     {NoFlag, 0x80000000, 0xffffffe0},
705                                     {NoFlag, 0x80000000, 0xfffffffd},
706                                     {NoFlag, 0x80000000, 0xfffffffe},
707                                     {NoFlag, 0x80000000, 0xffffffff},
708                                     {NoFlag, 0x80000001, 0x00000000},
709                                     {NoFlag, 0x80000001, 0x00000001},
710                                     {NoFlag, 0x80000001, 0x00000002},
711                                     {NoFlag, 0x80000001, 0x00000020},
712                                     {NoFlag, 0x80000001, 0x0000007d},
713                                     {NoFlag, 0x80000001, 0x0000007e},
714                                     {NoFlag, 0x80000001, 0x0000007f},
715                                     {NoFlag, 0x80000001, 0x00007ffd},
716                                     {NoFlag, 0x80000001, 0x00007ffe},
717                                     {NoFlag, 0x80000001, 0x00007fff},
718                                     {NoFlag, 0x80000001, 0x33333333},
719                                     {NoFlag, 0x80000001, 0x55555555},
720                                     {NoFlag, 0x80000001, 0x7ffffffd},
721                                     {NoFlag, 0x80000001, 0x7ffffffe},
722                                     {NoFlag, 0x80000001, 0x7fffffff},
723                                     {NoFlag, 0x80000001, 0x80000000},
724                                     {NoFlag, 0x80000001, 0x80000001},
725                                     {NoFlag, 0x80000001, 0xaaaaaaaa},
726                                     {NoFlag, 0x80000001, 0xcccccccc},
727                                     {NoFlag, 0x80000001, 0xffff8000},
728                                     {NoFlag, 0x80000001, 0xffff8001},
729                                     {NoFlag, 0x80000001, 0xffff8002},
730                                     {NoFlag, 0x80000001, 0xffff8003},
731                                     {NoFlag, 0x80000001, 0xffffff80},
732                                     {NoFlag, 0x80000001, 0xffffff81},
733                                     {NoFlag, 0x80000001, 0xffffff82},
734                                     {NoFlag, 0x80000001, 0xffffff83},
735                                     {NoFlag, 0x80000001, 0xffffffe0},
736                                     {NoFlag, 0x80000001, 0xfffffffd},
737                                     {NoFlag, 0x80000001, 0xfffffffe},
738                                     {NoFlag, 0x80000001, 0xffffffff},
739                                     {NoFlag, 0xaaaaaaaa, 0x00000000},
740                                     {NoFlag, 0xaaaaaaaa, 0x00000001},
741                                     {NoFlag, 0xaaaaaaaa, 0x00000002},
742                                     {NoFlag, 0xaaaaaaaa, 0x00000020},
743                                     {NoFlag, 0xaaaaaaaa, 0x0000007d},
744                                     {NoFlag, 0xaaaaaaaa, 0x0000007e},
745                                     {NoFlag, 0xaaaaaaaa, 0x0000007f},
746                                     {NoFlag, 0xaaaaaaaa, 0x00007ffd},
747                                     {NoFlag, 0xaaaaaaaa, 0x00007ffe},
748                                     {NoFlag, 0xaaaaaaaa, 0x00007fff},
749                                     {NoFlag, 0xaaaaaaaa, 0x33333333},
750                                     {NoFlag, 0xaaaaaaaa, 0x55555555},
751                                     {NoFlag, 0xaaaaaaaa, 0x7ffffffd},
752                                     {NoFlag, 0xaaaaaaaa, 0x7ffffffe},
753                                     {NoFlag, 0xaaaaaaaa, 0x7fffffff},
754                                     {NoFlag, 0xaaaaaaaa, 0x80000000},
755                                     {NoFlag, 0xaaaaaaaa, 0x80000001},
756                                     {NoFlag, 0xaaaaaaaa, 0xaaaaaaaa},
757                                     {NoFlag, 0xaaaaaaaa, 0xcccccccc},
758                                     {NoFlag, 0xaaaaaaaa, 0xffff8000},
759                                     {NoFlag, 0xaaaaaaaa, 0xffff8001},
760                                     {NoFlag, 0xaaaaaaaa, 0xffff8002},
761                                     {NoFlag, 0xaaaaaaaa, 0xffff8003},
762                                     {NoFlag, 0xaaaaaaaa, 0xffffff80},
763                                     {NoFlag, 0xaaaaaaaa, 0xffffff81},
764                                     {NoFlag, 0xaaaaaaaa, 0xffffff82},
765                                     {NoFlag, 0xaaaaaaaa, 0xffffff83},
766                                     {NoFlag, 0xaaaaaaaa, 0xffffffe0},
767                                     {NoFlag, 0xaaaaaaaa, 0xfffffffd},
768                                     {NoFlag, 0xaaaaaaaa, 0xfffffffe},
769                                     {NoFlag, 0xaaaaaaaa, 0xffffffff},
770                                     {NoFlag, 0xcccccccc, 0x00000000},
771                                     {NoFlag, 0xcccccccc, 0x00000001},
772                                     {NoFlag, 0xcccccccc, 0x00000002},
773                                     {NoFlag, 0xcccccccc, 0x00000020},
774                                     {NoFlag, 0xcccccccc, 0x0000007d},
775                                     {NoFlag, 0xcccccccc, 0x0000007e},
776                                     {NoFlag, 0xcccccccc, 0x0000007f},
777                                     {NoFlag, 0xcccccccc, 0x00007ffd},
778                                     {NoFlag, 0xcccccccc, 0x00007ffe},
779                                     {NoFlag, 0xcccccccc, 0x00007fff},
780                                     {NoFlag, 0xcccccccc, 0x33333333},
781                                     {NoFlag, 0xcccccccc, 0x55555555},
782                                     {NoFlag, 0xcccccccc, 0x7ffffffd},
783                                     {NoFlag, 0xcccccccc, 0x7ffffffe},
784                                     {NoFlag, 0xcccccccc, 0x7fffffff},
785                                     {NoFlag, 0xcccccccc, 0x80000000},
786                                     {NoFlag, 0xcccccccc, 0x80000001},
787                                     {NoFlag, 0xcccccccc, 0xaaaaaaaa},
788                                     {NoFlag, 0xcccccccc, 0xcccccccc},
789                                     {NoFlag, 0xcccccccc, 0xffff8000},
790                                     {NoFlag, 0xcccccccc, 0xffff8001},
791                                     {NoFlag, 0xcccccccc, 0xffff8002},
792                                     {NoFlag, 0xcccccccc, 0xffff8003},
793                                     {NoFlag, 0xcccccccc, 0xffffff80},
794                                     {NoFlag, 0xcccccccc, 0xffffff81},
795                                     {NoFlag, 0xcccccccc, 0xffffff82},
796                                     {NoFlag, 0xcccccccc, 0xffffff83},
797                                     {NoFlag, 0xcccccccc, 0xffffffe0},
798                                     {NoFlag, 0xcccccccc, 0xfffffffd},
799                                     {NoFlag, 0xcccccccc, 0xfffffffe},
800                                     {NoFlag, 0xcccccccc, 0xffffffff},
801                                     {NoFlag, 0xffff8000, 0x00000000},
802                                     {NoFlag, 0xffff8000, 0x00000001},
803                                     {NoFlag, 0xffff8000, 0x00000002},
804                                     {NoFlag, 0xffff8000, 0x00000020},
805                                     {NoFlag, 0xffff8000, 0x0000007d},
806                                     {NoFlag, 0xffff8000, 0x0000007e},
807                                     {NoFlag, 0xffff8000, 0x0000007f},
808                                     {NoFlag, 0xffff8000, 0x00007ffd},
809                                     {NoFlag, 0xffff8000, 0x00007ffe},
810                                     {NoFlag, 0xffff8000, 0x00007fff},
811                                     {NoFlag, 0xffff8000, 0x33333333},
812                                     {NoFlag, 0xffff8000, 0x55555555},
813                                     {NoFlag, 0xffff8000, 0x7ffffffd},
814                                     {NoFlag, 0xffff8000, 0x7ffffffe},
815                                     {NoFlag, 0xffff8000, 0x7fffffff},
816                                     {NoFlag, 0xffff8000, 0x80000000},
817                                     {NoFlag, 0xffff8000, 0x80000001},
818                                     {NoFlag, 0xffff8000, 0xaaaaaaaa},
819                                     {NoFlag, 0xffff8000, 0xcccccccc},
820                                     {NoFlag, 0xffff8000, 0xffff8000},
821                                     {NoFlag, 0xffff8000, 0xffff8001},
822                                     {NoFlag, 0xffff8000, 0xffff8002},
823                                     {NoFlag, 0xffff8000, 0xffff8003},
824                                     {NoFlag, 0xffff8000, 0xffffff80},
825                                     {NoFlag, 0xffff8000, 0xffffff81},
826                                     {NoFlag, 0xffff8000, 0xffffff82},
827                                     {NoFlag, 0xffff8000, 0xffffff83},
828                                     {NoFlag, 0xffff8000, 0xffffffe0},
829                                     {NoFlag, 0xffff8000, 0xfffffffd},
830                                     {NoFlag, 0xffff8000, 0xfffffffe},
831                                     {NoFlag, 0xffff8000, 0xffffffff},
832                                     {NoFlag, 0xffff8001, 0x00000000},
833                                     {NoFlag, 0xffff8001, 0x00000001},
834                                     {NoFlag, 0xffff8001, 0x00000002},
835                                     {NoFlag, 0xffff8001, 0x00000020},
836                                     {NoFlag, 0xffff8001, 0x0000007d},
837                                     {NoFlag, 0xffff8001, 0x0000007e},
838                                     {NoFlag, 0xffff8001, 0x0000007f},
839                                     {NoFlag, 0xffff8001, 0x00007ffd},
840                                     {NoFlag, 0xffff8001, 0x00007ffe},
841                                     {NoFlag, 0xffff8001, 0x00007fff},
842                                     {NoFlag, 0xffff8001, 0x33333333},
843                                     {NoFlag, 0xffff8001, 0x55555555},
844                                     {NoFlag, 0xffff8001, 0x7ffffffd},
845                                     {NoFlag, 0xffff8001, 0x7ffffffe},
846                                     {NoFlag, 0xffff8001, 0x7fffffff},
847                                     {NoFlag, 0xffff8001, 0x80000000},
848                                     {NoFlag, 0xffff8001, 0x80000001},
849                                     {NoFlag, 0xffff8001, 0xaaaaaaaa},
850                                     {NoFlag, 0xffff8001, 0xcccccccc},
851                                     {NoFlag, 0xffff8001, 0xffff8000},
852                                     {NoFlag, 0xffff8001, 0xffff8001},
853                                     {NoFlag, 0xffff8001, 0xffff8002},
854                                     {NoFlag, 0xffff8001, 0xffff8003},
855                                     {NoFlag, 0xffff8001, 0xffffff80},
856                                     {NoFlag, 0xffff8001, 0xffffff81},
857                                     {NoFlag, 0xffff8001, 0xffffff82},
858                                     {NoFlag, 0xffff8001, 0xffffff83},
859                                     {NoFlag, 0xffff8001, 0xffffffe0},
860                                     {NoFlag, 0xffff8001, 0xfffffffd},
861                                     {NoFlag, 0xffff8001, 0xfffffffe},
862                                     {NoFlag, 0xffff8001, 0xffffffff},
863                                     {NoFlag, 0xffff8002, 0x00000000},
864                                     {NoFlag, 0xffff8002, 0x00000001},
865                                     {NoFlag, 0xffff8002, 0x00000002},
866                                     {NoFlag, 0xffff8002, 0x00000020},
867                                     {NoFlag, 0xffff8002, 0x0000007d},
868                                     {NoFlag, 0xffff8002, 0x0000007e},
869                                     {NoFlag, 0xffff8002, 0x0000007f},
870                                     {NoFlag, 0xffff8002, 0x00007ffd},
871                                     {NoFlag, 0xffff8002, 0x00007ffe},
872                                     {NoFlag, 0xffff8002, 0x00007fff},
873                                     {NoFlag, 0xffff8002, 0x33333333},
874                                     {NoFlag, 0xffff8002, 0x55555555},
875                                     {NoFlag, 0xffff8002, 0x7ffffffd},
876                                     {NoFlag, 0xffff8002, 0x7ffffffe},
877                                     {NoFlag, 0xffff8002, 0x7fffffff},
878                                     {NoFlag, 0xffff8002, 0x80000000},
879                                     {NoFlag, 0xffff8002, 0x80000001},
880                                     {NoFlag, 0xffff8002, 0xaaaaaaaa},
881                                     {NoFlag, 0xffff8002, 0xcccccccc},
882                                     {NoFlag, 0xffff8002, 0xffff8000},
883                                     {NoFlag, 0xffff8002, 0xffff8001},
884                                     {NoFlag, 0xffff8002, 0xffff8002},
885                                     {NoFlag, 0xffff8002, 0xffff8003},
886                                     {NoFlag, 0xffff8002, 0xffffff80},
887                                     {NoFlag, 0xffff8002, 0xffffff81},
888                                     {NoFlag, 0xffff8002, 0xffffff82},
889                                     {NoFlag, 0xffff8002, 0xffffff83},
890                                     {NoFlag, 0xffff8002, 0xffffffe0},
891                                     {NoFlag, 0xffff8002, 0xfffffffd},
892                                     {NoFlag, 0xffff8002, 0xfffffffe},
893                                     {NoFlag, 0xffff8002, 0xffffffff},
894                                     {NoFlag, 0xffff8003, 0x00000000},
895                                     {NoFlag, 0xffff8003, 0x00000001},
896                                     {NoFlag, 0xffff8003, 0x00000002},
897                                     {NoFlag, 0xffff8003, 0x00000020},
898                                     {NoFlag, 0xffff8003, 0x0000007d},
899                                     {NoFlag, 0xffff8003, 0x0000007e},
900                                     {NoFlag, 0xffff8003, 0x0000007f},
901                                     {NoFlag, 0xffff8003, 0x00007ffd},
902                                     {NoFlag, 0xffff8003, 0x00007ffe},
903                                     {NoFlag, 0xffff8003, 0x00007fff},
904                                     {NoFlag, 0xffff8003, 0x33333333},
905                                     {NoFlag, 0xffff8003, 0x55555555},
906                                     {NoFlag, 0xffff8003, 0x7ffffffd},
907                                     {NoFlag, 0xffff8003, 0x7ffffffe},
908                                     {NoFlag, 0xffff8003, 0x7fffffff},
909                                     {NoFlag, 0xffff8003, 0x80000000},
910                                     {NoFlag, 0xffff8003, 0x80000001},
911                                     {NoFlag, 0xffff8003, 0xaaaaaaaa},
912                                     {NoFlag, 0xffff8003, 0xcccccccc},
913                                     {NoFlag, 0xffff8003, 0xffff8000},
914                                     {NoFlag, 0xffff8003, 0xffff8001},
915                                     {NoFlag, 0xffff8003, 0xffff8002},
916                                     {NoFlag, 0xffff8003, 0xffff8003},
917                                     {NoFlag, 0xffff8003, 0xffffff80},
918                                     {NoFlag, 0xffff8003, 0xffffff81},
919                                     {NoFlag, 0xffff8003, 0xffffff82},
920                                     {NoFlag, 0xffff8003, 0xffffff83},
921                                     {NoFlag, 0xffff8003, 0xffffffe0},
922                                     {NoFlag, 0xffff8003, 0xfffffffd},
923                                     {NoFlag, 0xffff8003, 0xfffffffe},
924                                     {NoFlag, 0xffff8003, 0xffffffff},
925                                     {NoFlag, 0xffffff80, 0x00000000},
926                                     {NoFlag, 0xffffff80, 0x00000001},
927                                     {NoFlag, 0xffffff80, 0x00000002},
928                                     {NoFlag, 0xffffff80, 0x00000020},
929                                     {NoFlag, 0xffffff80, 0x0000007d},
930                                     {NoFlag, 0xffffff80, 0x0000007e},
931                                     {NoFlag, 0xffffff80, 0x0000007f},
932                                     {NoFlag, 0xffffff80, 0x00007ffd},
933                                     {NoFlag, 0xffffff80, 0x00007ffe},
934                                     {NoFlag, 0xffffff80, 0x00007fff},
935                                     {NoFlag, 0xffffff80, 0x33333333},
936                                     {NoFlag, 0xffffff80, 0x55555555},
937                                     {NoFlag, 0xffffff80, 0x7ffffffd},
938                                     {NoFlag, 0xffffff80, 0x7ffffffe},
939                                     {NoFlag, 0xffffff80, 0x7fffffff},
940                                     {NoFlag, 0xffffff80, 0x80000000},
941                                     {NoFlag, 0xffffff80, 0x80000001},
942                                     {NoFlag, 0xffffff80, 0xaaaaaaaa},
943                                     {NoFlag, 0xffffff80, 0xcccccccc},
944                                     {NoFlag, 0xffffff80, 0xffff8000},
945                                     {NoFlag, 0xffffff80, 0xffff8001},
946                                     {NoFlag, 0xffffff80, 0xffff8002},
947                                     {NoFlag, 0xffffff80, 0xffff8003},
948                                     {NoFlag, 0xffffff80, 0xffffff80},
949                                     {NoFlag, 0xffffff80, 0xffffff81},
950                                     {NoFlag, 0xffffff80, 0xffffff82},
951                                     {NoFlag, 0xffffff80, 0xffffff83},
952                                     {NoFlag, 0xffffff80, 0xffffffe0},
953                                     {NoFlag, 0xffffff80, 0xfffffffd},
954                                     {NoFlag, 0xffffff80, 0xfffffffe},
955                                     {NoFlag, 0xffffff80, 0xffffffff},
956                                     {NoFlag, 0xffffff81, 0x00000000},
957                                     {NoFlag, 0xffffff81, 0x00000001},
958                                     {NoFlag, 0xffffff81, 0x00000002},
959                                     {NoFlag, 0xffffff81, 0x00000020},
960                                     {NoFlag, 0xffffff81, 0x0000007d},
961                                     {NoFlag, 0xffffff81, 0x0000007e},
962                                     {NoFlag, 0xffffff81, 0x0000007f},
963                                     {NoFlag, 0xffffff81, 0x00007ffd},
964                                     {NoFlag, 0xffffff81, 0x00007ffe},
965                                     {NoFlag, 0xffffff81, 0x00007fff},
966                                     {NoFlag, 0xffffff81, 0x33333333},
967                                     {NoFlag, 0xffffff81, 0x55555555},
968                                     {NoFlag, 0xffffff81, 0x7ffffffd},
969                                     {NoFlag, 0xffffff81, 0x7ffffffe},
970                                     {NoFlag, 0xffffff81, 0x7fffffff},
971                                     {NoFlag, 0xffffff81, 0x80000000},
972                                     {NoFlag, 0xffffff81, 0x80000001},
973                                     {NoFlag, 0xffffff81, 0xaaaaaaaa},
974                                     {NoFlag, 0xffffff81, 0xcccccccc},
975                                     {NoFlag, 0xffffff81, 0xffff8000},
976                                     {NoFlag, 0xffffff81, 0xffff8001},
977                                     {NoFlag, 0xffffff81, 0xffff8002},
978                                     {NoFlag, 0xffffff81, 0xffff8003},
979                                     {NoFlag, 0xffffff81, 0xffffff80},
980                                     {NoFlag, 0xffffff81, 0xffffff81},
981                                     {NoFlag, 0xffffff81, 0xffffff82},
982                                     {NoFlag, 0xffffff81, 0xffffff83},
983                                     {NoFlag, 0xffffff81, 0xffffffe0},
984                                     {NoFlag, 0xffffff81, 0xfffffffd},
985                                     {NoFlag, 0xffffff81, 0xfffffffe},
986                                     {NoFlag, 0xffffff81, 0xffffffff},
987                                     {NoFlag, 0xffffff82, 0x00000000},
988                                     {NoFlag, 0xffffff82, 0x00000001},
989                                     {NoFlag, 0xffffff82, 0x00000002},
990                                     {NoFlag, 0xffffff82, 0x00000020},
991                                     {NoFlag, 0xffffff82, 0x0000007d},
992                                     {NoFlag, 0xffffff82, 0x0000007e},
993                                     {NoFlag, 0xffffff82, 0x0000007f},
994                                     {NoFlag, 0xffffff82, 0x00007ffd},
995                                     {NoFlag, 0xffffff82, 0x00007ffe},
996                                     {NoFlag, 0xffffff82, 0x00007fff},
997                                     {NoFlag, 0xffffff82, 0x33333333},
998                                     {NoFlag, 0xffffff82, 0x55555555},
999                                     {NoFlag, 0xffffff82, 0x7ffffffd},
1000                                     {NoFlag, 0xffffff82, 0x7ffffffe},
1001                                     {NoFlag, 0xffffff82, 0x7fffffff},
1002                                     {NoFlag, 0xffffff82, 0x80000000},
1003                                     {NoFlag, 0xffffff82, 0x80000001},
1004                                     {NoFlag, 0xffffff82, 0xaaaaaaaa},
1005                                     {NoFlag, 0xffffff82, 0xcccccccc},
1006                                     {NoFlag, 0xffffff82, 0xffff8000},
1007                                     {NoFlag, 0xffffff82, 0xffff8001},
1008                                     {NoFlag, 0xffffff82, 0xffff8002},
1009                                     {NoFlag, 0xffffff82, 0xffff8003},
1010                                     {NoFlag, 0xffffff82, 0xffffff80},
1011                                     {NoFlag, 0xffffff82, 0xffffff81},
1012                                     {NoFlag, 0xffffff82, 0xffffff82},
1013                                     {NoFlag, 0xffffff82, 0xffffff83},
1014                                     {NoFlag, 0xffffff82, 0xffffffe0},
1015                                     {NoFlag, 0xffffff82, 0xfffffffd},
1016                                     {NoFlag, 0xffffff82, 0xfffffffe},
1017                                     {NoFlag, 0xffffff82, 0xffffffff},
1018                                     {NoFlag, 0xffffff83, 0x00000000},
1019                                     {NoFlag, 0xffffff83, 0x00000001},
1020                                     {NoFlag, 0xffffff83, 0x00000002},
1021                                     {NoFlag, 0xffffff83, 0x00000020},
1022                                     {NoFlag, 0xffffff83, 0x0000007d},
1023                                     {NoFlag, 0xffffff83, 0x0000007e},
1024                                     {NoFlag, 0xffffff83, 0x0000007f},
1025                                     {NoFlag, 0xffffff83, 0x00007ffd},
1026                                     {NoFlag, 0xffffff83, 0x00007ffe},
1027                                     {NoFlag, 0xffffff83, 0x00007fff},
1028                                     {NoFlag, 0xffffff83, 0x33333333},
1029                                     {NoFlag, 0xffffff83, 0x55555555},
1030                                     {NoFlag, 0xffffff83, 0x7ffffffd},
1031                                     {NoFlag, 0xffffff83, 0x7ffffffe},
1032                                     {NoFlag, 0xffffff83, 0x7fffffff},
1033                                     {NoFlag, 0xffffff83, 0x80000000},
1034                                     {NoFlag, 0xffffff83, 0x80000001},
1035                                     {NoFlag, 0xffffff83, 0xaaaaaaaa},
1036                                     {NoFlag, 0xffffff83, 0xcccccccc},
1037                                     {NoFlag, 0xffffff83, 0xffff8000},
1038                                     {NoFlag, 0xffffff83, 0xffff8001},
1039                                     {NoFlag, 0xffffff83, 0xffff8002},
1040                                     {NoFlag, 0xffffff83, 0xffff8003},
1041                                     {NoFlag, 0xffffff83, 0xffffff80},
1042                                     {NoFlag, 0xffffff83, 0xffffff81},
1043                                     {NoFlag, 0xffffff83, 0xffffff82},
1044                                     {NoFlag, 0xffffff83, 0xffffff83},
1045                                     {NoFlag, 0xffffff83, 0xffffffe0},
1046                                     {NoFlag, 0xffffff83, 0xfffffffd},
1047                                     {NoFlag, 0xffffff83, 0xfffffffe},
1048                                     {NoFlag, 0xffffff83, 0xffffffff},
1049                                     {NoFlag, 0xffffffe0, 0x00000000},
1050                                     {NoFlag, 0xffffffe0, 0x00000001},
1051                                     {NoFlag, 0xffffffe0, 0x00000002},
1052                                     {NoFlag, 0xffffffe0, 0x00000020},
1053                                     {NoFlag, 0xffffffe0, 0x0000007d},
1054                                     {NoFlag, 0xffffffe0, 0x0000007e},
1055                                     {NoFlag, 0xffffffe0, 0x0000007f},
1056                                     {NoFlag, 0xffffffe0, 0x00007ffd},
1057                                     {NoFlag, 0xffffffe0, 0x00007ffe},
1058                                     {NoFlag, 0xffffffe0, 0x00007fff},
1059                                     {NoFlag, 0xffffffe0, 0x33333333},
1060                                     {NoFlag, 0xffffffe0, 0x55555555},
1061                                     {NoFlag, 0xffffffe0, 0x7ffffffd},
1062                                     {NoFlag, 0xffffffe0, 0x7ffffffe},
1063                                     {NoFlag, 0xffffffe0, 0x7fffffff},
1064                                     {NoFlag, 0xffffffe0, 0x80000000},
1065                                     {NoFlag, 0xffffffe0, 0x80000001},
1066                                     {NoFlag, 0xffffffe0, 0xaaaaaaaa},
1067                                     {NoFlag, 0xffffffe0, 0xcccccccc},
1068                                     {NoFlag, 0xffffffe0, 0xffff8000},
1069                                     {NoFlag, 0xffffffe0, 0xffff8001},
1070                                     {NoFlag, 0xffffffe0, 0xffff8002},
1071                                     {NoFlag, 0xffffffe0, 0xffff8003},
1072                                     {NoFlag, 0xffffffe0, 0xffffff80},
1073                                     {NoFlag, 0xffffffe0, 0xffffff81},
1074                                     {NoFlag, 0xffffffe0, 0xffffff82},
1075                                     {NoFlag, 0xffffffe0, 0xffffff83},
1076                                     {NoFlag, 0xffffffe0, 0xffffffe0},
1077                                     {NoFlag, 0xffffffe0, 0xfffffffd},
1078                                     {NoFlag, 0xffffffe0, 0xfffffffe},
1079                                     {NoFlag, 0xffffffe0, 0xffffffff},
1080                                     {NoFlag, 0xfffffffd, 0x00000000},
1081                                     {NoFlag, 0xfffffffd, 0x00000001},
1082                                     {NoFlag, 0xfffffffd, 0x00000002},
1083                                     {NoFlag, 0xfffffffd, 0x00000020},
1084                                     {NoFlag, 0xfffffffd, 0x0000007d},
1085                                     {NoFlag, 0xfffffffd, 0x0000007e},
1086                                     {NoFlag, 0xfffffffd, 0x0000007f},
1087                                     {NoFlag, 0xfffffffd, 0x00007ffd},
1088                                     {NoFlag, 0xfffffffd, 0x00007ffe},
1089                                     {NoFlag, 0xfffffffd, 0x00007fff},
1090                                     {NoFlag, 0xfffffffd, 0x33333333},
1091                                     {NoFlag, 0xfffffffd, 0x55555555},
1092                                     {NoFlag, 0xfffffffd, 0x7ffffffd},
1093                                     {NoFlag, 0xfffffffd, 0x7ffffffe},
1094                                     {NoFlag, 0xfffffffd, 0x7fffffff},
1095                                     {NoFlag, 0xfffffffd, 0x80000000},
1096                                     {NoFlag, 0xfffffffd, 0x80000001},
1097                                     {NoFlag, 0xfffffffd, 0xaaaaaaaa},
1098                                     {NoFlag, 0xfffffffd, 0xcccccccc},
1099                                     {NoFlag, 0xfffffffd, 0xffff8000},
1100                                     {NoFlag, 0xfffffffd, 0xffff8001},
1101                                     {NoFlag, 0xfffffffd, 0xffff8002},
1102                                     {NoFlag, 0xfffffffd, 0xffff8003},
1103                                     {NoFlag, 0xfffffffd, 0xffffff80},
1104                                     {NoFlag, 0xfffffffd, 0xffffff81},
1105                                     {NoFlag, 0xfffffffd, 0xffffff82},
1106                                     {NoFlag, 0xfffffffd, 0xffffff83},
1107                                     {NoFlag, 0xfffffffd, 0xffffffe0},
1108                                     {NoFlag, 0xfffffffd, 0xfffffffd},
1109                                     {NoFlag, 0xfffffffd, 0xfffffffe},
1110                                     {NoFlag, 0xfffffffd, 0xffffffff},
1111                                     {NoFlag, 0xfffffffe, 0x00000000},
1112                                     {NoFlag, 0xfffffffe, 0x00000001},
1113                                     {NoFlag, 0xfffffffe, 0x00000002},
1114                                     {NoFlag, 0xfffffffe, 0x00000020},
1115                                     {NoFlag, 0xfffffffe, 0x0000007d},
1116                                     {NoFlag, 0xfffffffe, 0x0000007e},
1117                                     {NoFlag, 0xfffffffe, 0x0000007f},
1118                                     {NoFlag, 0xfffffffe, 0x00007ffd},
1119                                     {NoFlag, 0xfffffffe, 0x00007ffe},
1120                                     {NoFlag, 0xfffffffe, 0x00007fff},
1121                                     {NoFlag, 0xfffffffe, 0x33333333},
1122                                     {NoFlag, 0xfffffffe, 0x55555555},
1123                                     {NoFlag, 0xfffffffe, 0x7ffffffd},
1124                                     {NoFlag, 0xfffffffe, 0x7ffffffe},
1125                                     {NoFlag, 0xfffffffe, 0x7fffffff},
1126                                     {NoFlag, 0xfffffffe, 0x80000000},
1127                                     {NoFlag, 0xfffffffe, 0x80000001},
1128                                     {NoFlag, 0xfffffffe, 0xaaaaaaaa},
1129                                     {NoFlag, 0xfffffffe, 0xcccccccc},
1130                                     {NoFlag, 0xfffffffe, 0xffff8000},
1131                                     {NoFlag, 0xfffffffe, 0xffff8001},
1132                                     {NoFlag, 0xfffffffe, 0xffff8002},
1133                                     {NoFlag, 0xfffffffe, 0xffff8003},
1134                                     {NoFlag, 0xfffffffe, 0xffffff80},
1135                                     {NoFlag, 0xfffffffe, 0xffffff81},
1136                                     {NoFlag, 0xfffffffe, 0xffffff82},
1137                                     {NoFlag, 0xfffffffe, 0xffffff83},
1138                                     {NoFlag, 0xfffffffe, 0xffffffe0},
1139                                     {NoFlag, 0xfffffffe, 0xfffffffd},
1140                                     {NoFlag, 0xfffffffe, 0xfffffffe},
1141                                     {NoFlag, 0xfffffffe, 0xffffffff},
1142                                     {NoFlag, 0xffffffff, 0x00000000},
1143                                     {NoFlag, 0xffffffff, 0x00000001},
1144                                     {NoFlag, 0xffffffff, 0x00000002},
1145                                     {NoFlag, 0xffffffff, 0x00000020},
1146                                     {NoFlag, 0xffffffff, 0x0000007d},
1147                                     {NoFlag, 0xffffffff, 0x0000007e},
1148                                     {NoFlag, 0xffffffff, 0x0000007f},
1149                                     {NoFlag, 0xffffffff, 0x00007ffd},
1150                                     {NoFlag, 0xffffffff, 0x00007ffe},
1151                                     {NoFlag, 0xffffffff, 0x00007fff},
1152                                     {NoFlag, 0xffffffff, 0x33333333},
1153                                     {NoFlag, 0xffffffff, 0x55555555},
1154                                     {NoFlag, 0xffffffff, 0x7ffffffd},
1155                                     {NoFlag, 0xffffffff, 0x7ffffffe},
1156                                     {NoFlag, 0xffffffff, 0x7fffffff},
1157                                     {NoFlag, 0xffffffff, 0x80000000},
1158                                     {NoFlag, 0xffffffff, 0x80000001},
1159                                     {NoFlag, 0xffffffff, 0xaaaaaaaa},
1160                                     {NoFlag, 0xffffffff, 0xcccccccc},
1161                                     {NoFlag, 0xffffffff, 0xffff8000},
1162                                     {NoFlag, 0xffffffff, 0xffff8001},
1163                                     {NoFlag, 0xffffffff, 0xffff8002},
1164                                     {NoFlag, 0xffffffff, 0xffff8003},
1165                                     {NoFlag, 0xffffffff, 0xffffff80},
1166                                     {NoFlag, 0xffffffff, 0xffffff81},
1167                                     {NoFlag, 0xffffffff, 0xffffff82},
1168                                     {NoFlag, 0xffffffff, 0xffffff83},
1169                                     {NoFlag, 0xffffffff, 0xffffffe0},
1170                                     {NoFlag, 0xffffffff, 0xfffffffd},
1171                                     {NoFlag, 0xffffffff, 0xfffffffe},
1172                                     {NoFlag, 0xffffffff, 0xffffffff}};
1173 
1174 static const Inputs kModifiedImmediate[] = {{NoFlag, 0xabababab, 0x00000000},
1175                                             {NoFlag, 0xabababab, 0x00000001},
1176                                             {NoFlag, 0xabababab, 0x00000002},
1177                                             {NoFlag, 0xabababab, 0x00000020},
1178                                             {NoFlag, 0xabababab, 0x0000007d},
1179                                             {NoFlag, 0xabababab, 0x0000007e},
1180                                             {NoFlag, 0xabababab, 0x0000007f},
1181                                             {NoFlag, 0xabababab, 0x00007ffd},
1182                                             {NoFlag, 0xabababab, 0x00007ffe},
1183                                             {NoFlag, 0xabababab, 0x00007fff},
1184                                             {NoFlag, 0xabababab, 0x33333333},
1185                                             {NoFlag, 0xabababab, 0x55555555},
1186                                             {NoFlag, 0xabababab, 0x7ffffffd},
1187                                             {NoFlag, 0xabababab, 0x7ffffffe},
1188                                             {NoFlag, 0xabababab, 0x7fffffff},
1189                                             {NoFlag, 0xabababab, 0x80000000},
1190                                             {NoFlag, 0xabababab, 0x80000001},
1191                                             {NoFlag, 0xabababab, 0xaaaaaaaa},
1192                                             {NoFlag, 0xabababab, 0xcccccccc},
1193                                             {NoFlag, 0xabababab, 0xffff8000},
1194                                             {NoFlag, 0xabababab, 0xffff8001},
1195                                             {NoFlag, 0xabababab, 0xffff8002},
1196                                             {NoFlag, 0xabababab, 0xffff8003},
1197                                             {NoFlag, 0xabababab, 0xffffff80},
1198                                             {NoFlag, 0xabababab, 0xffffff81},
1199                                             {NoFlag, 0xabababab, 0xffffff82},
1200                                             {NoFlag, 0xabababab, 0xffffff83},
1201                                             {NoFlag, 0xabababab, 0xffffffe0},
1202                                             {NoFlag, 0xabababab, 0xfffffffd},
1203                                             {NoFlag, 0xabababab, 0xfffffffe},
1204                                             {NoFlag, 0xabababab, 0xffffffff}};
1205 
1206 
1207 // A loop will be generated for each element of this array.
1208 const TestLoopData kTests[] = {{{al, r5, r5, 0x00001560},
1209                                 "al r5 r5 0x00001560",
1210                                 "RdIsRn_al_r5_r5_0x00001560",
1211                                 ARRAY_SIZE(kRdIsRn),
1212                                 kRdIsRn},
1213                                {{al, r0, r0, 0x00007f80},
1214                                 "al r0 r0 0x00007f80",
1215                                 "RdIsRn_al_r0_r0_0x00007f80",
1216                                 ARRAY_SIZE(kRdIsRn),
1217                                 kRdIsRn},
1218                                {{al, r1, r1, 0x002ac000},
1219                                 "al r1 r1 0x002ac000",
1220                                 "RdIsRn_al_r1_r1_0x002ac000",
1221                                 ARRAY_SIZE(kRdIsRn),
1222                                 kRdIsRn},
1223                                {{al, r10, r10, 0x15600000},
1224                                 "al r10 r10 0x15600000",
1225                                 "RdIsRn_al_r10_r10_0x15600000",
1226                                 ARRAY_SIZE(kRdIsRn),
1227                                 kRdIsRn},
1228                                {{al, r2, r2, 0x00001fe0},
1229                                 "al r2 r2 0x00001fe0",
1230                                 "RdIsRn_al_r2_r2_0x00001fe0",
1231                                 ARRAY_SIZE(kRdIsRn),
1232                                 kRdIsRn},
1233                                {{al, r12, r12, 0x2ac00000},
1234                                 "al r12 r12 0x2ac00000",
1235                                 "RdIsRn_al_r12_r12_0x2ac00000",
1236                                 ARRAY_SIZE(kRdIsRn),
1237                                 kRdIsRn},
1238                                {{al, r8, r8, 0x00001fe0},
1239                                 "al r8 r8 0x00001fe0",
1240                                 "RdIsRn_al_r8_r8_0x00001fe0",
1241                                 ARRAY_SIZE(kRdIsRn),
1242                                 kRdIsRn},
1243                                {{al, r4, r4, 0x00ff0000},
1244                                 "al r4 r4 0x00ff0000",
1245                                 "RdIsRn_al_r4_r4_0x00ff0000",
1246                                 ARRAY_SIZE(kRdIsRn),
1247                                 kRdIsRn},
1248                                {{al, r8, r8, 0x0007f800},
1249                                 "al r8 r8 0x0007f800",
1250                                 "RdIsRn_al_r8_r8_0x0007f800",
1251                                 ARRAY_SIZE(kRdIsRn),
1252                                 kRdIsRn},
1253                                {{al, r6, r6, 0x00005580},
1254                                 "al r6 r6 0x00005580",
1255                                 "RdIsRn_al_r6_r6_0x00005580",
1256                                 ARRAY_SIZE(kRdIsRn),
1257                                 kRdIsRn},
1258                                {{al, r5, r8, 0x0000ab00},
1259                                 "al r5 r8 0x0000ab00",
1260                                 "RdIsNotRn_al_r5_r8_0x0000ab00",
1261                                 ARRAY_SIZE(kRdIsNotRn),
1262                                 kRdIsNotRn},
1263                                {{al, r0, r4, 0x00005580},
1264                                 "al r0 r4 0x00005580",
1265                                 "RdIsNotRn_al_r0_r4_0x00005580",
1266                                 ARRAY_SIZE(kRdIsNotRn),
1267                                 kRdIsNotRn},
1268                                {{al, r9, r5, 0x0002ac00},
1269                                 "al r9 r5 0x0002ac00",
1270                                 "RdIsNotRn_al_r9_r5_0x0002ac00",
1271                                 ARRAY_SIZE(kRdIsNotRn),
1272                                 kRdIsNotRn},
1273                                {{al, r5, r14, 0x000002ac},
1274                                 "al r5 r14 0x000002ac",
1275                                 "RdIsNotRn_al_r5_r14_0x000002ac",
1276                                 ARRAY_SIZE(kRdIsNotRn),
1277                                 kRdIsNotRn},
1278                                {{al, r10, r7, 0x0002ac00},
1279                                 "al r10 r7 0x0002ac00",
1280                                 "RdIsNotRn_al_r10_r7_0x0002ac00",
1281                                 ARRAY_SIZE(kRdIsNotRn),
1282                                 kRdIsNotRn},
1283                                {{al, r3, r5, 0x00ff00ff},
1284                                 "al r3 r5 0x00ff00ff",
1285                                 "RdIsNotRn_al_r3_r5_0x00ff00ff",
1286                                 ARRAY_SIZE(kRdIsNotRn),
1287                                 kRdIsNotRn},
1288                                {{al, r1, r3, 0x02ac0000},
1289                                 "al r1 r3 0x02ac0000",
1290                                 "RdIsNotRn_al_r1_r3_0x02ac0000",
1291                                 ARRAY_SIZE(kRdIsNotRn),
1292                                 kRdIsNotRn},
1293                                {{al, r1, r10, 0x00558000},
1294                                 "al r1 r10 0x00558000",
1295                                 "RdIsNotRn_al_r1_r10_0x00558000",
1296                                 ARRAY_SIZE(kRdIsNotRn),
1297                                 kRdIsNotRn},
1298                                {{al, r14, r9, 0x01560000},
1299                                 "al r14 r9 0x01560000",
1300                                 "RdIsNotRn_al_r14_r9_0x01560000",
1301                                 ARRAY_SIZE(kRdIsNotRn),
1302                                 kRdIsNotRn},
1303                                {{al, r8, r0, 0x00002ac0},
1304                                 "al r8 r0 0x00002ac0",
1305                                 "RdIsNotRn_al_r8_r0_0x00002ac0",
1306                                 ARRAY_SIZE(kRdIsNotRn),
1307                                 kRdIsNotRn},
1308                                {{al, r0, r0, 0x000001fe},
1309                                 "al r0 r0 0x000001fe",
1310                                 "ModifiedImmediate_al_r0_r0_0x000001fe",
1311                                 ARRAY_SIZE(kModifiedImmediate),
1312                                 kModifiedImmediate},
1313                                {{al, r0, r0, 0x000003fc},
1314                                 "al r0 r0 0x000003fc",
1315                                 "ModifiedImmediate_al_r0_r0_0x000003fc",
1316                                 ARRAY_SIZE(kModifiedImmediate),
1317                                 kModifiedImmediate},
1318                                {{al, r0, r0, 0x000007f8},
1319                                 "al r0 r0 0x000007f8",
1320                                 "ModifiedImmediate_al_r0_r0_0x000007f8",
1321                                 ARRAY_SIZE(kModifiedImmediate),
1322                                 kModifiedImmediate},
1323                                {{al, r0, r0, 0x00000ff0},
1324                                 "al r0 r0 0x00000ff0",
1325                                 "ModifiedImmediate_al_r0_r0_0x00000ff0",
1326                                 ARRAY_SIZE(kModifiedImmediate),
1327                                 kModifiedImmediate},
1328                                {{al, r0, r0, 0x00001fe0},
1329                                 "al r0 r0 0x00001fe0",
1330                                 "ModifiedImmediate_al_r0_r0_0x00001fe0",
1331                                 ARRAY_SIZE(kModifiedImmediate),
1332                                 kModifiedImmediate},
1333                                {{al, r0, r0, 0x00003fc0},
1334                                 "al r0 r0 0x00003fc0",
1335                                 "ModifiedImmediate_al_r0_r0_0x00003fc0",
1336                                 ARRAY_SIZE(kModifiedImmediate),
1337                                 kModifiedImmediate},
1338                                {{al, r0, r0, 0x00007f80},
1339                                 "al r0 r0 0x00007f80",
1340                                 "ModifiedImmediate_al_r0_r0_0x00007f80",
1341                                 ARRAY_SIZE(kModifiedImmediate),
1342                                 kModifiedImmediate},
1343                                {{al, r0, r0, 0x0000ff00},
1344                                 "al r0 r0 0x0000ff00",
1345                                 "ModifiedImmediate_al_r0_r0_0x0000ff00",
1346                                 ARRAY_SIZE(kModifiedImmediate),
1347                                 kModifiedImmediate},
1348                                {{al, r0, r0, 0x0001fe00},
1349                                 "al r0 r0 0x0001fe00",
1350                                 "ModifiedImmediate_al_r0_r0_0x0001fe00",
1351                                 ARRAY_SIZE(kModifiedImmediate),
1352                                 kModifiedImmediate},
1353                                {{al, r0, r0, 0x0003fc00},
1354                                 "al r0 r0 0x0003fc00",
1355                                 "ModifiedImmediate_al_r0_r0_0x0003fc00",
1356                                 ARRAY_SIZE(kModifiedImmediate),
1357                                 kModifiedImmediate},
1358                                {{al, r0, r0, 0x0007f800},
1359                                 "al r0 r0 0x0007f800",
1360                                 "ModifiedImmediate_al_r0_r0_0x0007f800",
1361                                 ARRAY_SIZE(kModifiedImmediate),
1362                                 kModifiedImmediate},
1363                                {{al, r0, r0, 0x000ff000},
1364                                 "al r0 r0 0x000ff000",
1365                                 "ModifiedImmediate_al_r0_r0_0x000ff000",
1366                                 ARRAY_SIZE(kModifiedImmediate),
1367                                 kModifiedImmediate},
1368                                {{al, r0, r0, 0x001fe000},
1369                                 "al r0 r0 0x001fe000",
1370                                 "ModifiedImmediate_al_r0_r0_0x001fe000",
1371                                 ARRAY_SIZE(kModifiedImmediate),
1372                                 kModifiedImmediate},
1373                                {{al, r0, r0, 0x003fc000},
1374                                 "al r0 r0 0x003fc000",
1375                                 "ModifiedImmediate_al_r0_r0_0x003fc000",
1376                                 ARRAY_SIZE(kModifiedImmediate),
1377                                 kModifiedImmediate},
1378                                {{al, r0, r0, 0x007f8000},
1379                                 "al r0 r0 0x007f8000",
1380                                 "ModifiedImmediate_al_r0_r0_0x007f8000",
1381                                 ARRAY_SIZE(kModifiedImmediate),
1382                                 kModifiedImmediate},
1383                                {{al, r0, r0, 0x00ff0000},
1384                                 "al r0 r0 0x00ff0000",
1385                                 "ModifiedImmediate_al_r0_r0_0x00ff0000",
1386                                 ARRAY_SIZE(kModifiedImmediate),
1387                                 kModifiedImmediate},
1388                                {{al, r0, r0, 0x01fe0000},
1389                                 "al r0 r0 0x01fe0000",
1390                                 "ModifiedImmediate_al_r0_r0_0x01fe0000",
1391                                 ARRAY_SIZE(kModifiedImmediate),
1392                                 kModifiedImmediate},
1393                                {{al, r0, r0, 0x03fc0000},
1394                                 "al r0 r0 0x03fc0000",
1395                                 "ModifiedImmediate_al_r0_r0_0x03fc0000",
1396                                 ARRAY_SIZE(kModifiedImmediate),
1397                                 kModifiedImmediate},
1398                                {{al, r0, r0, 0x07f80000},
1399                                 "al r0 r0 0x07f80000",
1400                                 "ModifiedImmediate_al_r0_r0_0x07f80000",
1401                                 ARRAY_SIZE(kModifiedImmediate),
1402                                 kModifiedImmediate},
1403                                {{al, r0, r0, 0x0ff00000},
1404                                 "al r0 r0 0x0ff00000",
1405                                 "ModifiedImmediate_al_r0_r0_0x0ff00000",
1406                                 ARRAY_SIZE(kModifiedImmediate),
1407                                 kModifiedImmediate},
1408                                {{al, r0, r0, 0x1fe00000},
1409                                 "al r0 r0 0x1fe00000",
1410                                 "ModifiedImmediate_al_r0_r0_0x1fe00000",
1411                                 ARRAY_SIZE(kModifiedImmediate),
1412                                 kModifiedImmediate},
1413                                {{al, r0, r0, 0x3fc00000},
1414                                 "al r0 r0 0x3fc00000",
1415                                 "ModifiedImmediate_al_r0_r0_0x3fc00000",
1416                                 ARRAY_SIZE(kModifiedImmediate),
1417                                 kModifiedImmediate},
1418                                {{al, r0, r0, 0x7f800000},
1419                                 "al r0 r0 0x7f800000",
1420                                 "ModifiedImmediate_al_r0_r0_0x7f800000",
1421                                 ARRAY_SIZE(kModifiedImmediate),
1422                                 kModifiedImmediate},
1423                                {{al, r0, r0, 0xff000000},
1424                                 "al r0 r0 0xff000000",
1425                                 "ModifiedImmediate_al_r0_r0_0xff000000",
1426                                 ARRAY_SIZE(kModifiedImmediate),
1427                                 kModifiedImmediate},
1428                                {{al, r0, r0, 0x000000ff},
1429                                 "al r0 r0 0x000000ff",
1430                                 "ModifiedImmediate_al_r0_r0_0x000000ff",
1431                                 ARRAY_SIZE(kModifiedImmediate),
1432                                 kModifiedImmediate},
1433                                {{al, r0, r0, 0x00ff00ff},
1434                                 "al r0 r0 0x00ff00ff",
1435                                 "ModifiedImmediate_al_r0_r0_0x00ff00ff",
1436                                 ARRAY_SIZE(kModifiedImmediate),
1437                                 kModifiedImmediate},
1438                                {{al, r0, r0, 0xff00ff00},
1439                                 "al r0 r0 0xff00ff00",
1440                                 "ModifiedImmediate_al_r0_r0_0xff00ff00",
1441                                 ARRAY_SIZE(kModifiedImmediate),
1442                                 kModifiedImmediate},
1443                                {{al, r0, r0, 0xffffffff},
1444                                 "al r0 r0 0xffffffff",
1445                                 "ModifiedImmediate_al_r0_r0_0xffffffff",
1446                                 ARRAY_SIZE(kModifiedImmediate),
1447                                 kModifiedImmediate},
1448                                {{al, r0, r0, 0x00000156},
1449                                 "al r0 r0 0x00000156",
1450                                 "ModifiedImmediate_al_r0_r0_0x00000156",
1451                                 ARRAY_SIZE(kModifiedImmediate),
1452                                 kModifiedImmediate},
1453                                {{al, r0, r0, 0x000002ac},
1454                                 "al r0 r0 0x000002ac",
1455                                 "ModifiedImmediate_al_r0_r0_0x000002ac",
1456                                 ARRAY_SIZE(kModifiedImmediate),
1457                                 kModifiedImmediate},
1458                                {{al, r0, r0, 0x00000558},
1459                                 "al r0 r0 0x00000558",
1460                                 "ModifiedImmediate_al_r0_r0_0x00000558",
1461                                 ARRAY_SIZE(kModifiedImmediate),
1462                                 kModifiedImmediate},
1463                                {{al, r0, r0, 0x00000ab0},
1464                                 "al r0 r0 0x00000ab0",
1465                                 "ModifiedImmediate_al_r0_r0_0x00000ab0",
1466                                 ARRAY_SIZE(kModifiedImmediate),
1467                                 kModifiedImmediate},
1468                                {{al, r0, r0, 0x00001560},
1469                                 "al r0 r0 0x00001560",
1470                                 "ModifiedImmediate_al_r0_r0_0x00001560",
1471                                 ARRAY_SIZE(kModifiedImmediate),
1472                                 kModifiedImmediate},
1473                                {{al, r0, r0, 0x00002ac0},
1474                                 "al r0 r0 0x00002ac0",
1475                                 "ModifiedImmediate_al_r0_r0_0x00002ac0",
1476                                 ARRAY_SIZE(kModifiedImmediate),
1477                                 kModifiedImmediate},
1478                                {{al, r0, r0, 0x00005580},
1479                                 "al r0 r0 0x00005580",
1480                                 "ModifiedImmediate_al_r0_r0_0x00005580",
1481                                 ARRAY_SIZE(kModifiedImmediate),
1482                                 kModifiedImmediate},
1483                                {{al, r0, r0, 0x0000ab00},
1484                                 "al r0 r0 0x0000ab00",
1485                                 "ModifiedImmediate_al_r0_r0_0x0000ab00",
1486                                 ARRAY_SIZE(kModifiedImmediate),
1487                                 kModifiedImmediate},
1488                                {{al, r0, r0, 0x00015600},
1489                                 "al r0 r0 0x00015600",
1490                                 "ModifiedImmediate_al_r0_r0_0x00015600",
1491                                 ARRAY_SIZE(kModifiedImmediate),
1492                                 kModifiedImmediate},
1493                                {{al, r0, r0, 0x0002ac00},
1494                                 "al r0 r0 0x0002ac00",
1495                                 "ModifiedImmediate_al_r0_r0_0x0002ac00",
1496                                 ARRAY_SIZE(kModifiedImmediate),
1497                                 kModifiedImmediate},
1498                                {{al, r0, r0, 0x00055800},
1499                                 "al r0 r0 0x00055800",
1500                                 "ModifiedImmediate_al_r0_r0_0x00055800",
1501                                 ARRAY_SIZE(kModifiedImmediate),
1502                                 kModifiedImmediate},
1503                                {{al, r0, r0, 0x000ab000},
1504                                 "al r0 r0 0x000ab000",
1505                                 "ModifiedImmediate_al_r0_r0_0x000ab000",
1506                                 ARRAY_SIZE(kModifiedImmediate),
1507                                 kModifiedImmediate},
1508                                {{al, r0, r0, 0x00156000},
1509                                 "al r0 r0 0x00156000",
1510                                 "ModifiedImmediate_al_r0_r0_0x00156000",
1511                                 ARRAY_SIZE(kModifiedImmediate),
1512                                 kModifiedImmediate},
1513                                {{al, r0, r0, 0x002ac000},
1514                                 "al r0 r0 0x002ac000",
1515                                 "ModifiedImmediate_al_r0_r0_0x002ac000",
1516                                 ARRAY_SIZE(kModifiedImmediate),
1517                                 kModifiedImmediate},
1518                                {{al, r0, r0, 0x00558000},
1519                                 "al r0 r0 0x00558000",
1520                                 "ModifiedImmediate_al_r0_r0_0x00558000",
1521                                 ARRAY_SIZE(kModifiedImmediate),
1522                                 kModifiedImmediate},
1523                                {{al, r0, r0, 0x00ab0000},
1524                                 "al r0 r0 0x00ab0000",
1525                                 "ModifiedImmediate_al_r0_r0_0x00ab0000",
1526                                 ARRAY_SIZE(kModifiedImmediate),
1527                                 kModifiedImmediate},
1528                                {{al, r0, r0, 0x01560000},
1529                                 "al r0 r0 0x01560000",
1530                                 "ModifiedImmediate_al_r0_r0_0x01560000",
1531                                 ARRAY_SIZE(kModifiedImmediate),
1532                                 kModifiedImmediate},
1533                                {{al, r0, r0, 0x02ac0000},
1534                                 "al r0 r0 0x02ac0000",
1535                                 "ModifiedImmediate_al_r0_r0_0x02ac0000",
1536                                 ARRAY_SIZE(kModifiedImmediate),
1537                                 kModifiedImmediate},
1538                                {{al, r0, r0, 0x05580000},
1539                                 "al r0 r0 0x05580000",
1540                                 "ModifiedImmediate_al_r0_r0_0x05580000",
1541                                 ARRAY_SIZE(kModifiedImmediate),
1542                                 kModifiedImmediate},
1543                                {{al, r0, r0, 0x0ab00000},
1544                                 "al r0 r0 0x0ab00000",
1545                                 "ModifiedImmediate_al_r0_r0_0x0ab00000",
1546                                 ARRAY_SIZE(kModifiedImmediate),
1547                                 kModifiedImmediate},
1548                                {{al, r0, r0, 0x15600000},
1549                                 "al r0 r0 0x15600000",
1550                                 "ModifiedImmediate_al_r0_r0_0x15600000",
1551                                 ARRAY_SIZE(kModifiedImmediate),
1552                                 kModifiedImmediate},
1553                                {{al, r0, r0, 0x2ac00000},
1554                                 "al r0 r0 0x2ac00000",
1555                                 "ModifiedImmediate_al_r0_r0_0x2ac00000",
1556                                 ARRAY_SIZE(kModifiedImmediate),
1557                                 kModifiedImmediate},
1558                                {{al, r0, r0, 0x55800000},
1559                                 "al r0 r0 0x55800000",
1560                                 "ModifiedImmediate_al_r0_r0_0x55800000",
1561                                 ARRAY_SIZE(kModifiedImmediate),
1562                                 kModifiedImmediate},
1563                                {{al, r0, r0, 0xab000000},
1564                                 "al r0 r0 0xab000000",
1565                                 "ModifiedImmediate_al_r0_r0_0xab000000",
1566                                 ARRAY_SIZE(kModifiedImmediate),
1567                                 kModifiedImmediate},
1568                                {{al, r0, r0, 0x000000ab},
1569                                 "al r0 r0 0x000000ab",
1570                                 "ModifiedImmediate_al_r0_r0_0x000000ab",
1571                                 ARRAY_SIZE(kModifiedImmediate),
1572                                 kModifiedImmediate},
1573                                {{al, r0, r0, 0x00ab00ab},
1574                                 "al r0 r0 0x00ab00ab",
1575                                 "ModifiedImmediate_al_r0_r0_0x00ab00ab",
1576                                 ARRAY_SIZE(kModifiedImmediate),
1577                                 kModifiedImmediate},
1578                                {{al, r0, r0, 0xab00ab00},
1579                                 "al r0 r0 0xab00ab00",
1580                                 "ModifiedImmediate_al_r0_r0_0xab00ab00",
1581                                 ARRAY_SIZE(kModifiedImmediate),
1582                                 kModifiedImmediate},
1583                                {{al, r0, r0, 0xabababab},
1584                                 "al r0 r0 0xabababab",
1585                                 "ModifiedImmediate_al_r0_r0_0xabababab",
1586                                 ARRAY_SIZE(kModifiedImmediate),
1587                                 kModifiedImmediate}};
1588 
1589 // We record all inputs to the instructions as outputs. This way, we also check
1590 // that what shouldn't change didn't change.
1591 struct TestResult {
1592   size_t output_size;
1593   const Inputs* outputs;
1594 };
1595 
1596 // These headers each contain an array of `TestResult` with the reference output
1597 // values. The reference arrays are names `kReference{mnemonic}`.
1598 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-adc.h"
1599 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-adcs.h"
1600 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-add.h"
1601 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-adds.h"
1602 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-and.h"
1603 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-ands.h"
1604 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-bic.h"
1605 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-bics.h"
1606 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-eor.h"
1607 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-eors.h"
1608 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-orn.h"
1609 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-orns.h"
1610 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-orr.h"
1611 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-orrs.h"
1612 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-rsb.h"
1613 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-rsbs.h"
1614 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-sbc.h"
1615 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-sbcs.h"
1616 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-sub.h"
1617 #include "aarch32/traces/simulator-cond-rd-rn-operand-const-t32-subs.h"
1618 
1619 
1620 // The maximum number of errors to report in detail for each test.
1621 const unsigned kErrorReportLimit = 8;
1622 
1623 typedef void (MacroAssembler::*Fn)(Condition cond,
1624                                    Register rd,
1625                                    Register rn,
1626                                    const Operand& op);
1627 
TestHelper(Fn instruction,const char * mnemonic,const TestResult reference[])1628 void TestHelper(Fn instruction,
1629                 const char* mnemonic,
1630                 const TestResult reference[]) {
1631   SETUP();
1632   masm.UseT32();
1633   START();
1634 
1635   // Data to compare to `reference`.
1636   TestResult* results[ARRAY_SIZE(kTests)];
1637 
1638   // Test cases for memory bound instructions may allocate a buffer and save its
1639   // address in this array.
1640   byte* scratch_memory_buffers[ARRAY_SIZE(kTests)];
1641 
1642   // Generate a loop for each element in `kTests`. Each loop tests one specific
1643   // instruction.
1644   for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
1645     // Allocate results on the heap for this test.
1646     results[i] = new TestResult;
1647     results[i]->outputs = new Inputs[kTests[i].input_size];
1648     results[i]->output_size = kTests[i].input_size;
1649 
1650     size_t input_stride = sizeof(kTests[i].inputs[0]) * kTests[i].input_size;
1651     VIXL_ASSERT(IsUint32(input_stride));
1652 
1653     scratch_memory_buffers[i] = NULL;
1654 
1655     Label loop;
1656     UseScratchRegisterScope scratch_registers(&masm);
1657     // Include all registers from r0 ro r12.
1658     scratch_registers.Include(RegisterList(0x1fff));
1659 
1660     // Values to pass to the macro-assembler.
1661     Condition cond = kTests[i].operands.cond;
1662     Register rd = kTests[i].operands.rd;
1663     Register rn = kTests[i].operands.rn;
1664     uint32_t immediate = kTests[i].operands.immediate;
1665     Operand op(immediate);
1666     scratch_registers.Exclude(rd);
1667     scratch_registers.Exclude(rn);
1668 
1669     // Allocate reserved registers for our own use.
1670     Register input_ptr = scratch_registers.Acquire();
1671     Register input_end = scratch_registers.Acquire();
1672     Register result_ptr = scratch_registers.Acquire();
1673 
1674     // Initialize `input_ptr` to the first element and `input_end` the address
1675     // after the array.
1676     __ Mov(input_ptr, Operand::From(kTests[i].inputs));
1677     __ Add(input_end, input_ptr, static_cast<uint32_t>(input_stride));
1678     __ Mov(result_ptr, Operand::From(results[i]->outputs));
1679     __ Bind(&loop);
1680 
1681     {
1682       UseScratchRegisterScope temp_registers(&masm);
1683       Register nzcv_bits = temp_registers.Acquire();
1684       Register saved_q_bit = temp_registers.Acquire();
1685       // Save the `Q` bit flag.
1686       __ Mrs(saved_q_bit, APSR);
1687       __ And(saved_q_bit, saved_q_bit, QFlag);
1688       // Set the `NZCV` and `Q` flags together.
1689       __ Ldr(nzcv_bits, MemOperand(input_ptr, offsetof(Inputs, apsr)));
1690       __ Orr(nzcv_bits, nzcv_bits, saved_q_bit);
1691       __ Msr(APSR_nzcvq, nzcv_bits);
1692     }
1693     __ Ldr(rd, MemOperand(input_ptr, offsetof(Inputs, rd)));
1694     __ Ldr(rn, MemOperand(input_ptr, offsetof(Inputs, rn)));
1695 
1696     (masm.*instruction)(cond, rd, rn, op);
1697 
1698     {
1699       UseScratchRegisterScope temp_registers(&masm);
1700       Register nzcv_bits = temp_registers.Acquire();
1701       __ Mrs(nzcv_bits, APSR);
1702       // Only record the NZCV bits.
1703       __ And(nzcv_bits, nzcv_bits, NZCVFlag);
1704       __ Str(nzcv_bits, MemOperand(result_ptr, offsetof(Inputs, apsr)));
1705     }
1706     __ Str(rd, MemOperand(result_ptr, offsetof(Inputs, rd)));
1707     __ Str(rn, MemOperand(result_ptr, offsetof(Inputs, rn)));
1708 
1709     // Advance the result pointer.
1710     __ Add(result_ptr, result_ptr, Operand::From(sizeof(kTests[i].inputs[0])));
1711     // Loop back until `input_ptr` is lower than `input_base`.
1712     __ Add(input_ptr, input_ptr, Operand::From(sizeof(kTests[i].inputs[0])));
1713     __ Cmp(input_ptr, input_end);
1714     __ B(ne, &loop);
1715   }
1716 
1717   END();
1718 
1719   RUN();
1720 
1721   if (Test::generate_test_trace()) {
1722     // Print the results.
1723     for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1724       printf("const Inputs kOutputs_%s_%s[] = {\n",
1725              mnemonic,
1726              kTests[i].identifier);
1727       for (size_t j = 0; j < results[i]->output_size; j++) {
1728         printf("  { ");
1729         printf("0x%08" PRIx32, results[i]->outputs[j].apsr);
1730         printf(", ");
1731         printf("0x%08" PRIx32, results[i]->outputs[j].rd);
1732         printf(", ");
1733         printf("0x%08" PRIx32, results[i]->outputs[j].rn);
1734         printf(" },\n");
1735       }
1736       printf("};\n");
1737     }
1738     printf("const TestResult kReference%s[] = {\n", mnemonic);
1739     for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1740       printf("  {\n");
1741       printf("    ARRAY_SIZE(kOutputs_%s_%s),\n",
1742              mnemonic,
1743              kTests[i].identifier);
1744       printf("    kOutputs_%s_%s,\n", mnemonic, kTests[i].identifier);
1745       printf("  },\n");
1746     }
1747     printf("};\n");
1748   } else if (kCheckSimulatorTestResults) {
1749     // Check the results.
1750     unsigned total_error_count = 0;
1751     for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1752       bool instruction_has_errors = false;
1753       for (size_t j = 0; j < kTests[i].input_size; j++) {
1754         uint32_t apsr = results[i]->outputs[j].apsr;
1755         uint32_t rd = results[i]->outputs[j].rd;
1756         uint32_t rn = results[i]->outputs[j].rn;
1757         uint32_t apsr_input = kTests[i].inputs[j].apsr;
1758         uint32_t rd_input = kTests[i].inputs[j].rd;
1759         uint32_t rn_input = kTests[i].inputs[j].rn;
1760         uint32_t apsr_ref = reference[i].outputs[j].apsr;
1761         uint32_t rd_ref = reference[i].outputs[j].rd;
1762         uint32_t rn_ref = reference[i].outputs[j].rn;
1763 
1764         if (((apsr != apsr_ref) || (rd != rd_ref) || (rn != rn_ref)) &&
1765             (++total_error_count <= kErrorReportLimit)) {
1766           // Print the instruction once even if it triggered multiple failures.
1767           if (!instruction_has_errors) {
1768             printf("Error(s) when testing \"%s %s\":\n",
1769                    mnemonic,
1770                    kTests[i].operands_description);
1771             instruction_has_errors = true;
1772           }
1773           // Print subsequent errors.
1774           printf("  Input:    ");
1775           printf("0x%08" PRIx32, apsr_input);
1776           printf(", ");
1777           printf("0x%08" PRIx32, rd_input);
1778           printf(", ");
1779           printf("0x%08" PRIx32, rn_input);
1780           printf("\n");
1781           printf("  Expected: ");
1782           printf("0x%08" PRIx32, apsr_ref);
1783           printf(", ");
1784           printf("0x%08" PRIx32, rd_ref);
1785           printf(", ");
1786           printf("0x%08" PRIx32, rn_ref);
1787           printf("\n");
1788           printf("  Found:    ");
1789           printf("0x%08" PRIx32, apsr);
1790           printf(", ");
1791           printf("0x%08" PRIx32, rd);
1792           printf(", ");
1793           printf("0x%08" PRIx32, rn);
1794           printf("\n\n");
1795         }
1796       }
1797     }
1798 
1799     if (total_error_count > kErrorReportLimit) {
1800       printf("%u other errors follow.\n",
1801              total_error_count - kErrorReportLimit);
1802     }
1803     VIXL_CHECK(total_error_count == 0);
1804   } else {
1805     VIXL_WARNING("Assembled the code, but did not run anything.\n");
1806   }
1807 
1808   for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1809     delete[] results[i]->outputs;
1810     delete results[i];
1811     delete[] scratch_memory_buffers[i];
1812   }
1813 
1814   TEARDOWN();
1815 }
1816 
1817 // Instantiate tests for each instruction in the list.
1818 // TODO: Remove this limitation by having a sandboxing mechanism.
1819 #if defined(VIXL_HOST_POINTER_32)
1820 #define TEST(mnemonic)                                                      \
1821   void Test_##mnemonic() {                                                  \
1822     TestHelper(&MacroAssembler::mnemonic, #mnemonic, kReference##mnemonic); \
1823   }                                                                         \
1824   Test test_##mnemonic(                                                     \
1825       "AARCH32_SIMULATOR_COND_RD_RN_OPERAND_CONST_T32_" #mnemonic,          \
1826       &Test_##mnemonic);
1827 #else
1828 #define TEST(mnemonic)                                             \
1829   void Test_##mnemonic() {                                         \
1830     VIXL_WARNING("This test can only run on a 32-bit host.\n");    \
1831     USE(TestHelper);                                               \
1832   }                                                                \
1833   Test test_##mnemonic(                                            \
1834       "AARCH32_SIMULATOR_COND_RD_RN_OPERAND_CONST_T32_" #mnemonic, \
1835       &Test_##mnemonic);
1836 #endif
1837 
1838 FOREACH_INSTRUCTION(TEST)
1839 #undef TEST
1840 
1841 }  // namespace
1842 #endif
1843 
1844 }  // namespace aarch32
1845 }  // namespace vixl
1846