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/disasm-aarch32.h"
44#include "aarch32/macro-assembler-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#else  // ifdef VIXL_INCLUDE_SIMULATOR_AARCH32.
64
65#define SETUP()                  \
66  MacroAssembler masm(BUF_SIZE); \
67  UseScratchRegisterScope harness_scratch;
68
69#define START()                 \
70  harness_scratch.Open(&masm);  \
71  harness_scratch.ExcludeAll(); \
72  masm.GetBuffer()->Reset();    \
73  __ Push(r4);                  \
74  __ Push(r5);                  \
75  __ Push(r6);                  \
76  __ Push(r7);                  \
77  __ Push(r8);                  \
78  __ Push(r9);                  \
79  __ Push(r10);                 \
80  __ Push(r11);                 \
81  __ Push(lr);                  \
82  harness_scratch.Include(ip);
83
84#define END()                  \
85  harness_scratch.Exclude(ip); \
86  __ Pop(lr);                  \
87  __ Pop(r11);                 \
88  __ Pop(r10);                 \
89  __ Pop(r9);                  \
90  __ Pop(r8);                  \
91  __ Pop(r7);                  \
92  __ Pop(r6);                  \
93  __ Pop(r5);                  \
94  __ Pop(r4);                  \
95  __ Bx(lr);                   \
96  __ FinalizeCode();           \
97  harness_scratch.Close();
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#endif  // ifdef VIXL_INCLUDE_SIMULATOR_AARCH32
110
111namespace vixl {
112namespace aarch32 {
113
114// List of instruction encodings:
115#define FOREACH_INSTRUCTION(M) \
116  M(Cmn)                       \
117  M(Cmp)                       \
118  M(Mov)                       \
119  M(Movs)                      \
120  M(Mvn)                       \
121  M(Mvns)                      \
122  M(Teq)                       \
123  M(Tst)
124
125
126// The following definitions are defined again in each generated test, therefore
127// we need to place them in an anomymous namespace. It expresses that they are
128// local to this file only, and the compiler is not allowed to share these types
129// across test files during template instantiation. Specifically, `Operands` and
130// `Inputs` have various layouts across generated tests so they absolutely
131// cannot be shared.
132
133#ifdef VIXL_INCLUDE_TARGET_A32
134namespace {
135
136// Values to be passed to the assembler to produce the instruction under test.
137struct Operands {
138  Condition cond;
139  Register rd;
140  Register rn;
141  ShiftType shift;
142  Register rs;
143};
144
145// Input data to feed to the instruction.
146struct Inputs {
147  uint32_t apsr;
148  uint32_t rd;
149  uint32_t rn;
150  uint32_t rs;
151};
152
153// This structure contains all input data needed to test one specific encoding.
154// It used to generate a loop over an instruction.
155struct TestLoopData {
156  // The `operands` fields represents the values to pass to the assembler to
157  // produce the instruction.
158  Operands operands;
159  // Description of the operands, used for error reporting.
160  const char* operands_description;
161  // Unique identifier, used for generating traces.
162  const char* identifier;
163  // Array of values to be fed to the instruction.
164  size_t input_size;
165  const Inputs* inputs;
166};
167
168static const Inputs kCondition[] = {{NFlag, 0xabababab, 0xabababab, 0},
169                                    {ZFlag, 0xabababab, 0xabababab, 0},
170                                    {CFlag, 0xabababab, 0xabababab, 0},
171                                    {VFlag, 0xabababab, 0xabababab, 0},
172                                    {NZFlag, 0xabababab, 0xabababab, 0},
173                                    {NCFlag, 0xabababab, 0xabababab, 0},
174                                    {NVFlag, 0xabababab, 0xabababab, 0},
175                                    {ZCFlag, 0xabababab, 0xabababab, 0},
176                                    {ZVFlag, 0xabababab, 0xabababab, 0},
177                                    {CVFlag, 0xabababab, 0xabababab, 0},
178                                    {NZCFlag, 0xabababab, 0xabababab, 0},
179                                    {NZVFlag, 0xabababab, 0xabababab, 0},
180                                    {NCVFlag, 0xabababab, 0xabababab, 0},
181                                    {ZCVFlag, 0xabababab, 0xabababab, 0},
182                                    {NZCVFlag, 0xabababab, 0xabababab, 0}};
183
184static const Inputs kRdIsRn[] =
185    {{NoFlag, 0x00000000, 0x00000000, 0}, {NoFlag, 0x00000001, 0x00000001, 0},
186     {NoFlag, 0x00000002, 0x00000002, 0}, {NoFlag, 0x00000020, 0x00000020, 0},
187     {NoFlag, 0x0000007d, 0x0000007d, 0}, {NoFlag, 0x0000007e, 0x0000007e, 0},
188     {NoFlag, 0x0000007f, 0x0000007f, 0}, {NoFlag, 0x00007ffd, 0x00007ffd, 0},
189     {NoFlag, 0x00007ffe, 0x00007ffe, 0}, {NoFlag, 0x00007fff, 0x00007fff, 0},
190     {NoFlag, 0x33333333, 0x33333333, 0}, {NoFlag, 0x55555555, 0x55555555, 0},
191     {NoFlag, 0x7ffffffd, 0x7ffffffd, 0}, {NoFlag, 0x7ffffffe, 0x7ffffffe, 0},
192     {NoFlag, 0x7fffffff, 0x7fffffff, 0}, {NoFlag, 0x80000000, 0x80000000, 0},
193     {NoFlag, 0x80000001, 0x80000001, 0}, {NoFlag, 0xaaaaaaaa, 0xaaaaaaaa, 0},
194     {NoFlag, 0xcccccccc, 0xcccccccc, 0}, {NoFlag, 0xffff8000, 0xffff8000, 0},
195     {NoFlag, 0xffff8001, 0xffff8001, 0}, {NoFlag, 0xffff8002, 0xffff8002, 0},
196     {NoFlag, 0xffff8003, 0xffff8003, 0}, {NoFlag, 0xffffff80, 0xffffff80, 0},
197     {NoFlag, 0xffffff81, 0xffffff81, 0}, {NoFlag, 0xffffff82, 0xffffff82, 0},
198     {NoFlag, 0xffffff83, 0xffffff83, 0}, {NoFlag, 0xffffffe0, 0xffffffe0, 0},
199     {NoFlag, 0xfffffffd, 0xfffffffd, 0}, {NoFlag, 0xfffffffe, 0xfffffffe, 0},
200     {NoFlag, 0xffffffff, 0xffffffff, 0}};
201
202static const Inputs kRdIsNotRn[] =
203    {{NoFlag, 0x00000002, 0xcccccccc, 0}, {NoFlag, 0x7ffffffd, 0x00007ffe, 0},
204     {NoFlag, 0xffffff80, 0x00000020, 0}, {NoFlag, 0xaaaaaaaa, 0xaaaaaaaa, 0},
205     {NoFlag, 0x33333333, 0xffffff82, 0}, {NoFlag, 0xffff8001, 0x7ffffffe, 0},
206     {NoFlag, 0xfffffffd, 0x00007ffe, 0}, {NoFlag, 0xffffff80, 0x80000000, 0},
207     {NoFlag, 0x00000001, 0x33333333, 0}, {NoFlag, 0xcccccccc, 0x7ffffffe, 0},
208     {NoFlag, 0x00000000, 0xcccccccc, 0}, {NoFlag, 0x00000000, 0x55555555, 0},
209     {NoFlag, 0xffffffff, 0xffffffff, 0}, {NoFlag, 0x0000007e, 0xffff8002, 0},
210     {NoFlag, 0x80000000, 0x7ffffffd, 0}, {NoFlag, 0xffffff81, 0x0000007e, 0},
211     {NoFlag, 0x0000007f, 0xffff8001, 0}, {NoFlag, 0xffffffe0, 0x00007ffd, 0},
212     {NoFlag, 0xffff8003, 0x00000002, 0}, {NoFlag, 0xffffff83, 0x55555555, 0},
213     {NoFlag, 0xffffff83, 0xffffff80, 0}, {NoFlag, 0xffffff81, 0xffff8000, 0},
214     {NoFlag, 0x00000020, 0x7ffffffe, 0}, {NoFlag, 0xffffffe0, 0x00000000, 0},
215     {NoFlag, 0x7fffffff, 0x0000007e, 0}, {NoFlag, 0x80000001, 0xffffffff, 0},
216     {NoFlag, 0x00000001, 0x80000001, 0}, {NoFlag, 0x00000002, 0x0000007f, 0},
217     {NoFlag, 0x7fffffff, 0xcccccccc, 0}, {NoFlag, 0x80000001, 0x00007ffe, 0},
218     {NoFlag, 0xffff8002, 0x0000007e, 0}, {NoFlag, 0x00007ffe, 0xcccccccc, 0},
219     {NoFlag, 0x80000000, 0xffff8002, 0}, {NoFlag, 0xffffff83, 0x7ffffffe, 0},
220     {NoFlag, 0xffff8001, 0x00000001, 0}, {NoFlag, 0xffffff81, 0x00000020, 0},
221     {NoFlag, 0xfffffffe, 0xffff8001, 0}, {NoFlag, 0xffffffff, 0xfffffffe, 0},
222     {NoFlag, 0xcccccccc, 0x55555555, 0}, {NoFlag, 0x00000020, 0xffffff83, 0},
223     {NoFlag, 0xffffff83, 0xffff8001, 0}, {NoFlag, 0xffffff83, 0xffff8000, 0},
224     {NoFlag, 0x00007fff, 0x00000002, 0}, {NoFlag, 0x55555555, 0xffff8000, 0},
225     {NoFlag, 0x80000001, 0xffffff81, 0}, {NoFlag, 0x00000002, 0x00000000, 0},
226     {NoFlag, 0x33333333, 0xffffff81, 0}, {NoFlag, 0xffff8001, 0xffffff82, 0},
227     {NoFlag, 0xcccccccc, 0xffff8003, 0}, {NoFlag, 0xffff8003, 0x7ffffffd, 0},
228     {NoFlag, 0x0000007d, 0x00007ffe, 0}, {NoFlag, 0xffffff80, 0x0000007d, 0},
229     {NoFlag, 0xaaaaaaaa, 0x00007ffd, 0}, {NoFlag, 0x80000000, 0xffffff82, 0},
230     {NoFlag, 0x00000002, 0x7ffffffe, 0}, {NoFlag, 0x00000002, 0xffffff83, 0},
231     {NoFlag, 0x55555555, 0x00000002, 0}, {NoFlag, 0xffffffff, 0xffffff82, 0},
232     {NoFlag, 0xaaaaaaaa, 0x00000020, 0}, {NoFlag, 0x00000001, 0xffffff82, 0},
233     {NoFlag, 0x0000007f, 0xffffff82, 0}, {NoFlag, 0x7ffffffd, 0xaaaaaaaa, 0},
234     {NoFlag, 0x00007ffe, 0x00000001, 0}, {NoFlag, 0xfffffffd, 0xffffffe0, 0},
235     {NoFlag, 0xffffff81, 0xffffff83, 0}, {NoFlag, 0x0000007d, 0x00000000, 0},
236     {NoFlag, 0x0000007d, 0xffff8000, 0}, {NoFlag, 0xffffff81, 0x7fffffff, 0},
237     {NoFlag, 0xffffffff, 0x80000000, 0}, {NoFlag, 0x00000000, 0x00000001, 0},
238     {NoFlag, 0x55555555, 0xffffff82, 0}, {NoFlag, 0x00007ffe, 0x00007ffe, 0},
239     {NoFlag, 0x80000001, 0xfffffffd, 0}, {NoFlag, 0x00007fff, 0x33333333, 0},
240     {NoFlag, 0x00007fff, 0x80000000, 0}, {NoFlag, 0xcccccccc, 0x00007fff, 0},
241     {NoFlag, 0xfffffffe, 0xffffffe0, 0}, {NoFlag, 0x7ffffffe, 0x0000007f, 0},
242     {NoFlag, 0x00007ffd, 0xffff8001, 0}, {NoFlag, 0x00000002, 0x00000001, 0},
243     {NoFlag, 0x80000000, 0xffffffff, 0}, {NoFlag, 0xffffff83, 0xcccccccc, 0},
244     {NoFlag, 0xffff8002, 0x7ffffffe, 0}, {NoFlag, 0xaaaaaaaa, 0x00000000, 0},
245     {NoFlag, 0xffffff80, 0xcccccccc, 0}, {NoFlag, 0x33333333, 0xffffff83, 0},
246     {NoFlag, 0x0000007e, 0xffffffe0, 0}, {NoFlag, 0x0000007e, 0x00007fff, 0},
247     {NoFlag, 0x0000007f, 0x00000002, 0}, {NoFlag, 0x7ffffffe, 0xcccccccc, 0},
248     {NoFlag, 0x0000007d, 0xffffff80, 0}, {NoFlag, 0x00007fff, 0x00000020, 0},
249     {NoFlag, 0x7ffffffe, 0xfffffffe, 0}, {NoFlag, 0xfffffffe, 0xffffff81, 0},
250     {NoFlag, 0xffffffff, 0x0000007f, 0}, {NoFlag, 0xffff8002, 0x7ffffffd, 0},
251     {NoFlag, 0xffff8001, 0xfffffffe, 0}, {NoFlag, 0x33333333, 0xffff8002, 0},
252     {NoFlag, 0x00000000, 0xffffffff, 0}, {NoFlag, 0x33333333, 0xffffff80, 0},
253     {NoFlag, 0x0000007f, 0x00007fff, 0}, {NoFlag, 0xffffffff, 0xffff8001, 0},
254     {NoFlag, 0x7fffffff, 0xffff8002, 0}, {NoFlag, 0x7ffffffd, 0xffffff83, 0},
255     {NoFlag, 0x7fffffff, 0x0000007f, 0}, {NoFlag, 0xffffff83, 0xfffffffe, 0},
256     {NoFlag, 0x7ffffffe, 0xffff8003, 0}, {NoFlag, 0xffff8002, 0xffff8002, 0},
257     {NoFlag, 0x80000001, 0x0000007f, 0}, {NoFlag, 0x00000020, 0x00000002, 0},
258     {NoFlag, 0xffffff82, 0xffff8001, 0}, {NoFlag, 0xffffffff, 0x00000001, 0},
259     {NoFlag, 0xffffff80, 0xffff8002, 0}, {NoFlag, 0xffff8003, 0x7fffffff, 0},
260     {NoFlag, 0xffffffff, 0xffff8000, 0}, {NoFlag, 0xffff8002, 0x00007ffd, 0},
261     {NoFlag, 0x00000020, 0xffffff81, 0}, {NoFlag, 0x00000001, 0x55555555, 0},
262     {NoFlag, 0x7ffffffe, 0x00000020, 0}, {NoFlag, 0x80000000, 0x00000001, 0},
263     {NoFlag, 0x00007ffd, 0xffff8002, 0}, {NoFlag, 0x7fffffff, 0xfffffffe, 0},
264     {NoFlag, 0xcccccccc, 0x00007ffd, 0}, {NoFlag, 0x00000000, 0xfffffffd, 0},
265     {NoFlag, 0xffff8003, 0xffffff80, 0}, {NoFlag, 0x80000001, 0xffffff80, 0},
266     {NoFlag, 0xffffffff, 0xffff8002, 0}, {NoFlag, 0x00007ffe, 0xffff8002, 0},
267     {NoFlag, 0xffffff80, 0x00007ffe, 0}, {NoFlag, 0x80000001, 0xffff8001, 0},
268     {NoFlag, 0x0000007f, 0xffffff80, 0}, {NoFlag, 0xffffff81, 0x80000000, 0},
269     {NoFlag, 0x00007fff, 0x00007ffe, 0}, {NoFlag, 0x33333333, 0xffff8000, 0},
270     {NoFlag, 0x33333333, 0x00007fff, 0}, {NoFlag, 0x00000000, 0x0000007d, 0},
271     {NoFlag, 0x80000001, 0x00000000, 0}, {NoFlag, 0xffffffff, 0x55555555, 0},
272     {NoFlag, 0x80000001, 0x80000000, 0}, {NoFlag, 0xffffffff, 0xffffff80, 0},
273     {NoFlag, 0xffffff81, 0xffff8003, 0}, {NoFlag, 0x55555555, 0x80000001, 0},
274     {NoFlag, 0x7fffffff, 0xffff8001, 0}, {NoFlag, 0xffffff83, 0x00000002, 0},
275     {NoFlag, 0x0000007e, 0xffffff81, 0}, {NoFlag, 0x80000000, 0xffff8001, 0},
276     {NoFlag, 0xffffff80, 0xfffffffe, 0}, {NoFlag, 0x0000007e, 0xfffffffd, 0},
277     {NoFlag, 0xffffffe0, 0xffffffff, 0}, {NoFlag, 0x55555555, 0x80000000, 0},
278     {NoFlag, 0x0000007d, 0x80000001, 0}, {NoFlag, 0xffffffe0, 0x7ffffffd, 0},
279     {NoFlag, 0x00000000, 0x00000000, 0}, {NoFlag, 0x55555555, 0x00000001, 0},
280     {NoFlag, 0x00007ffd, 0x7fffffff, 0}, {NoFlag, 0x55555555, 0xffffffff, 0},
281     {NoFlag, 0xffff8003, 0x00007fff, 0}, {NoFlag, 0xffffff82, 0x00007fff, 0},
282     {NoFlag, 0x33333333, 0x55555555, 0}, {NoFlag, 0x00000020, 0x33333333, 0},
283     {NoFlag, 0x7ffffffe, 0xfffffffd, 0}, {NoFlag, 0x7ffffffe, 0x00000001, 0},
284     {NoFlag, 0xffffff83, 0xffffffe0, 0}, {NoFlag, 0xfffffffe, 0xaaaaaaaa, 0},
285     {NoFlag, 0xffff8002, 0x33333333, 0}, {NoFlag, 0xffff8002, 0xffff8003, 0},
286     {NoFlag, 0x33333333, 0x7fffffff, 0}, {NoFlag, 0xfffffffd, 0xffffff83, 0},
287     {NoFlag, 0x00000000, 0xffff8000, 0}, {NoFlag, 0xffffff82, 0x55555555, 0},
288     {NoFlag, 0xffffff82, 0xffffff81, 0}, {NoFlag, 0xcccccccc, 0xfffffffe, 0},
289     {NoFlag, 0xfffffffd, 0x7fffffff, 0}, {NoFlag, 0x00007fff, 0x7fffffff, 0},
290     {NoFlag, 0xffffff83, 0xffff8003, 0}, {NoFlag, 0xfffffffe, 0xffffffff, 0},
291     {NoFlag, 0x7ffffffd, 0x00007ffd, 0}, {NoFlag, 0x7ffffffd, 0x00007fff, 0},
292     {NoFlag, 0x00007ffd, 0xffffffff, 0}, {NoFlag, 0x00000001, 0xffff8003, 0},
293     {NoFlag, 0xffffff80, 0xfffffffd, 0}, {NoFlag, 0x33333333, 0x80000000, 0},
294     {NoFlag, 0xffff8001, 0x00000020, 0}, {NoFlag, 0xcccccccc, 0x00000002, 0},
295     {NoFlag, 0x00000000, 0x00000002, 0}, {NoFlag, 0x0000007d, 0x00007fff, 0},
296     {NoFlag, 0xcccccccc, 0x00000001, 0}, {NoFlag, 0xffffff83, 0x00007fff, 0},
297     {NoFlag, 0x80000001, 0x00000020, 0}, {NoFlag, 0xffff8003, 0xffffffe0, 0},
298     {NoFlag, 0x00007ffd, 0xaaaaaaaa, 0}, {NoFlag, 0x33333333, 0xffff8001, 0},
299     {NoFlag, 0xffffff83, 0x80000001, 0}, {NoFlag, 0xffff8000, 0xffff8000, 0},
300     {NoFlag, 0x00007ffe, 0xffff8001, 0}, {NoFlag, 0x7ffffffd, 0x00000000, 0},
301     {NoFlag, 0x00007ffe, 0x33333333, 0}, {NoFlag, 0xffff8001, 0xffffff80, 0},
302     {NoFlag, 0xfffffffe, 0x55555555, 0}, {NoFlag, 0xffffff82, 0xffffffff, 0}};
303
304static const Inputs kShiftTypes[] =
305    {{NoFlag, 0xabababab, 0x00000000, 0},  {NoFlag, 0xabababab, 0x00000000, 1},
306     {NoFlag, 0xabababab, 0x00000000, 2},  {NoFlag, 0xabababab, 0x00000000, 3},
307     {NoFlag, 0xabababab, 0x00000000, 4},  {NoFlag, 0xabababab, 0x00000000, 5},
308     {NoFlag, 0xabababab, 0x00000000, 6},  {NoFlag, 0xabababab, 0x00000000, 7},
309     {NoFlag, 0xabababab, 0x00000000, 8},  {NoFlag, 0xabababab, 0x00000000, 9},
310     {NoFlag, 0xabababab, 0x00000000, 10}, {NoFlag, 0xabababab, 0x00000000, 11},
311     {NoFlag, 0xabababab, 0x00000000, 12}, {NoFlag, 0xabababab, 0x00000000, 13},
312     {NoFlag, 0xabababab, 0x00000000, 14}, {NoFlag, 0xabababab, 0x00000000, 15},
313     {NoFlag, 0xabababab, 0x00000000, 16}, {NoFlag, 0xabababab, 0x00000000, 17},
314     {NoFlag, 0xabababab, 0x00000000, 18}, {NoFlag, 0xabababab, 0x00000000, 19},
315     {NoFlag, 0xabababab, 0x00000000, 20}, {NoFlag, 0xabababab, 0x00000000, 21},
316     {NoFlag, 0xabababab, 0x00000000, 22}, {NoFlag, 0xabababab, 0x00000000, 23},
317     {NoFlag, 0xabababab, 0x00000000, 24}, {NoFlag, 0xabababab, 0x00000000, 25},
318     {NoFlag, 0xabababab, 0x00000000, 26}, {NoFlag, 0xabababab, 0x00000000, 27},
319     {NoFlag, 0xabababab, 0x00000000, 28}, {NoFlag, 0xabababab, 0x00000000, 29},
320     {NoFlag, 0xabababab, 0x00000000, 30}, {NoFlag, 0xabababab, 0x00000000, 31},
321     {NoFlag, 0xabababab, 0x00000000, 32}, {NoFlag, 0xabababab, 0x00000001, 0},
322     {NoFlag, 0xabababab, 0x00000001, 1},  {NoFlag, 0xabababab, 0x00000001, 2},
323     {NoFlag, 0xabababab, 0x00000001, 3},  {NoFlag, 0xabababab, 0x00000001, 4},
324     {NoFlag, 0xabababab, 0x00000001, 5},  {NoFlag, 0xabababab, 0x00000001, 6},
325     {NoFlag, 0xabababab, 0x00000001, 7},  {NoFlag, 0xabababab, 0x00000001, 8},
326     {NoFlag, 0xabababab, 0x00000001, 9},  {NoFlag, 0xabababab, 0x00000001, 10},
327     {NoFlag, 0xabababab, 0x00000001, 11}, {NoFlag, 0xabababab, 0x00000001, 12},
328     {NoFlag, 0xabababab, 0x00000001, 13}, {NoFlag, 0xabababab, 0x00000001, 14},
329     {NoFlag, 0xabababab, 0x00000001, 15}, {NoFlag, 0xabababab, 0x00000001, 16},
330     {NoFlag, 0xabababab, 0x00000001, 17}, {NoFlag, 0xabababab, 0x00000001, 18},
331     {NoFlag, 0xabababab, 0x00000001, 19}, {NoFlag, 0xabababab, 0x00000001, 20},
332     {NoFlag, 0xabababab, 0x00000001, 21}, {NoFlag, 0xabababab, 0x00000001, 22},
333     {NoFlag, 0xabababab, 0x00000001, 23}, {NoFlag, 0xabababab, 0x00000001, 24},
334     {NoFlag, 0xabababab, 0x00000001, 25}, {NoFlag, 0xabababab, 0x00000001, 26},
335     {NoFlag, 0xabababab, 0x00000001, 27}, {NoFlag, 0xabababab, 0x00000001, 28},
336     {NoFlag, 0xabababab, 0x00000001, 29}, {NoFlag, 0xabababab, 0x00000001, 30},
337     {NoFlag, 0xabababab, 0x00000001, 31}, {NoFlag, 0xabababab, 0x00000001, 32},
338     {NoFlag, 0xabababab, 0x00000002, 0},  {NoFlag, 0xabababab, 0x00000002, 1},
339     {NoFlag, 0xabababab, 0x00000002, 2},  {NoFlag, 0xabababab, 0x00000002, 3},
340     {NoFlag, 0xabababab, 0x00000002, 4},  {NoFlag, 0xabababab, 0x00000002, 5},
341     {NoFlag, 0xabababab, 0x00000002, 6},  {NoFlag, 0xabababab, 0x00000002, 7},
342     {NoFlag, 0xabababab, 0x00000002, 8},  {NoFlag, 0xabababab, 0x00000002, 9},
343     {NoFlag, 0xabababab, 0x00000002, 10}, {NoFlag, 0xabababab, 0x00000002, 11},
344     {NoFlag, 0xabababab, 0x00000002, 12}, {NoFlag, 0xabababab, 0x00000002, 13},
345     {NoFlag, 0xabababab, 0x00000002, 14}, {NoFlag, 0xabababab, 0x00000002, 15},
346     {NoFlag, 0xabababab, 0x00000002, 16}, {NoFlag, 0xabababab, 0x00000002, 17},
347     {NoFlag, 0xabababab, 0x00000002, 18}, {NoFlag, 0xabababab, 0x00000002, 19},
348     {NoFlag, 0xabababab, 0x00000002, 20}, {NoFlag, 0xabababab, 0x00000002, 21},
349     {NoFlag, 0xabababab, 0x00000002, 22}, {NoFlag, 0xabababab, 0x00000002, 23},
350     {NoFlag, 0xabababab, 0x00000002, 24}, {NoFlag, 0xabababab, 0x00000002, 25},
351     {NoFlag, 0xabababab, 0x00000002, 26}, {NoFlag, 0xabababab, 0x00000002, 27},
352     {NoFlag, 0xabababab, 0x00000002, 28}, {NoFlag, 0xabababab, 0x00000002, 29},
353     {NoFlag, 0xabababab, 0x00000002, 30}, {NoFlag, 0xabababab, 0x00000002, 31},
354     {NoFlag, 0xabababab, 0x00000002, 32}, {NoFlag, 0xabababab, 0x00000020, 0},
355     {NoFlag, 0xabababab, 0x00000020, 1},  {NoFlag, 0xabababab, 0x00000020, 2},
356     {NoFlag, 0xabababab, 0x00000020, 3},  {NoFlag, 0xabababab, 0x00000020, 4},
357     {NoFlag, 0xabababab, 0x00000020, 5},  {NoFlag, 0xabababab, 0x00000020, 6},
358     {NoFlag, 0xabababab, 0x00000020, 7},  {NoFlag, 0xabababab, 0x00000020, 8},
359     {NoFlag, 0xabababab, 0x00000020, 9},  {NoFlag, 0xabababab, 0x00000020, 10},
360     {NoFlag, 0xabababab, 0x00000020, 11}, {NoFlag, 0xabababab, 0x00000020, 12},
361     {NoFlag, 0xabababab, 0x00000020, 13}, {NoFlag, 0xabababab, 0x00000020, 14},
362     {NoFlag, 0xabababab, 0x00000020, 15}, {NoFlag, 0xabababab, 0x00000020, 16},
363     {NoFlag, 0xabababab, 0x00000020, 17}, {NoFlag, 0xabababab, 0x00000020, 18},
364     {NoFlag, 0xabababab, 0x00000020, 19}, {NoFlag, 0xabababab, 0x00000020, 20},
365     {NoFlag, 0xabababab, 0x00000020, 21}, {NoFlag, 0xabababab, 0x00000020, 22},
366     {NoFlag, 0xabababab, 0x00000020, 23}, {NoFlag, 0xabababab, 0x00000020, 24},
367     {NoFlag, 0xabababab, 0x00000020, 25}, {NoFlag, 0xabababab, 0x00000020, 26},
368     {NoFlag, 0xabababab, 0x00000020, 27}, {NoFlag, 0xabababab, 0x00000020, 28},
369     {NoFlag, 0xabababab, 0x00000020, 29}, {NoFlag, 0xabababab, 0x00000020, 30},
370     {NoFlag, 0xabababab, 0x00000020, 31}, {NoFlag, 0xabababab, 0x00000020, 32},
371     {NoFlag, 0xabababab, 0x0000007d, 0},  {NoFlag, 0xabababab, 0x0000007d, 1},
372     {NoFlag, 0xabababab, 0x0000007d, 2},  {NoFlag, 0xabababab, 0x0000007d, 3},
373     {NoFlag, 0xabababab, 0x0000007d, 4},  {NoFlag, 0xabababab, 0x0000007d, 5},
374     {NoFlag, 0xabababab, 0x0000007d, 6},  {NoFlag, 0xabababab, 0x0000007d, 7},
375     {NoFlag, 0xabababab, 0x0000007d, 8},  {NoFlag, 0xabababab, 0x0000007d, 9},
376     {NoFlag, 0xabababab, 0x0000007d, 10}, {NoFlag, 0xabababab, 0x0000007d, 11},
377     {NoFlag, 0xabababab, 0x0000007d, 12}, {NoFlag, 0xabababab, 0x0000007d, 13},
378     {NoFlag, 0xabababab, 0x0000007d, 14}, {NoFlag, 0xabababab, 0x0000007d, 15},
379     {NoFlag, 0xabababab, 0x0000007d, 16}, {NoFlag, 0xabababab, 0x0000007d, 17},
380     {NoFlag, 0xabababab, 0x0000007d, 18}, {NoFlag, 0xabababab, 0x0000007d, 19},
381     {NoFlag, 0xabababab, 0x0000007d, 20}, {NoFlag, 0xabababab, 0x0000007d, 21},
382     {NoFlag, 0xabababab, 0x0000007d, 22}, {NoFlag, 0xabababab, 0x0000007d, 23},
383     {NoFlag, 0xabababab, 0x0000007d, 24}, {NoFlag, 0xabababab, 0x0000007d, 25},
384     {NoFlag, 0xabababab, 0x0000007d, 26}, {NoFlag, 0xabababab, 0x0000007d, 27},
385     {NoFlag, 0xabababab, 0x0000007d, 28}, {NoFlag, 0xabababab, 0x0000007d, 29},
386     {NoFlag, 0xabababab, 0x0000007d, 30}, {NoFlag, 0xabababab, 0x0000007d, 31},
387     {NoFlag, 0xabababab, 0x0000007d, 32}, {NoFlag, 0xabababab, 0x0000007e, 0},
388     {NoFlag, 0xabababab, 0x0000007e, 1},  {NoFlag, 0xabababab, 0x0000007e, 2},
389     {NoFlag, 0xabababab, 0x0000007e, 3},  {NoFlag, 0xabababab, 0x0000007e, 4},
390     {NoFlag, 0xabababab, 0x0000007e, 5},  {NoFlag, 0xabababab, 0x0000007e, 6},
391     {NoFlag, 0xabababab, 0x0000007e, 7},  {NoFlag, 0xabababab, 0x0000007e, 8},
392     {NoFlag, 0xabababab, 0x0000007e, 9},  {NoFlag, 0xabababab, 0x0000007e, 10},
393     {NoFlag, 0xabababab, 0x0000007e, 11}, {NoFlag, 0xabababab, 0x0000007e, 12},
394     {NoFlag, 0xabababab, 0x0000007e, 13}, {NoFlag, 0xabababab, 0x0000007e, 14},
395     {NoFlag, 0xabababab, 0x0000007e, 15}, {NoFlag, 0xabababab, 0x0000007e, 16},
396     {NoFlag, 0xabababab, 0x0000007e, 17}, {NoFlag, 0xabababab, 0x0000007e, 18},
397     {NoFlag, 0xabababab, 0x0000007e, 19}, {NoFlag, 0xabababab, 0x0000007e, 20},
398     {NoFlag, 0xabababab, 0x0000007e, 21}, {NoFlag, 0xabababab, 0x0000007e, 22},
399     {NoFlag, 0xabababab, 0x0000007e, 23}, {NoFlag, 0xabababab, 0x0000007e, 24},
400     {NoFlag, 0xabababab, 0x0000007e, 25}, {NoFlag, 0xabababab, 0x0000007e, 26},
401     {NoFlag, 0xabababab, 0x0000007e, 27}, {NoFlag, 0xabababab, 0x0000007e, 28},
402     {NoFlag, 0xabababab, 0x0000007e, 29}, {NoFlag, 0xabababab, 0x0000007e, 30},
403     {NoFlag, 0xabababab, 0x0000007e, 31}, {NoFlag, 0xabababab, 0x0000007e, 32},
404     {NoFlag, 0xabababab, 0x0000007f, 0},  {NoFlag, 0xabababab, 0x0000007f, 1},
405     {NoFlag, 0xabababab, 0x0000007f, 2},  {NoFlag, 0xabababab, 0x0000007f, 3},
406     {NoFlag, 0xabababab, 0x0000007f, 4},  {NoFlag, 0xabababab, 0x0000007f, 5},
407     {NoFlag, 0xabababab, 0x0000007f, 6},  {NoFlag, 0xabababab, 0x0000007f, 7},
408     {NoFlag, 0xabababab, 0x0000007f, 8},  {NoFlag, 0xabababab, 0x0000007f, 9},
409     {NoFlag, 0xabababab, 0x0000007f, 10}, {NoFlag, 0xabababab, 0x0000007f, 11},
410     {NoFlag, 0xabababab, 0x0000007f, 12}, {NoFlag, 0xabababab, 0x0000007f, 13},
411     {NoFlag, 0xabababab, 0x0000007f, 14}, {NoFlag, 0xabababab, 0x0000007f, 15},
412     {NoFlag, 0xabababab, 0x0000007f, 16}, {NoFlag, 0xabababab, 0x0000007f, 17},
413     {NoFlag, 0xabababab, 0x0000007f, 18}, {NoFlag, 0xabababab, 0x0000007f, 19},
414     {NoFlag, 0xabababab, 0x0000007f, 20}, {NoFlag, 0xabababab, 0x0000007f, 21},
415     {NoFlag, 0xabababab, 0x0000007f, 22}, {NoFlag, 0xabababab, 0x0000007f, 23},
416     {NoFlag, 0xabababab, 0x0000007f, 24}, {NoFlag, 0xabababab, 0x0000007f, 25},
417     {NoFlag, 0xabababab, 0x0000007f, 26}, {NoFlag, 0xabababab, 0x0000007f, 27},
418     {NoFlag, 0xabababab, 0x0000007f, 28}, {NoFlag, 0xabababab, 0x0000007f, 29},
419     {NoFlag, 0xabababab, 0x0000007f, 30}, {NoFlag, 0xabababab, 0x0000007f, 31},
420     {NoFlag, 0xabababab, 0x0000007f, 32}, {NoFlag, 0xabababab, 0x00007ffd, 0},
421     {NoFlag, 0xabababab, 0x00007ffd, 1},  {NoFlag, 0xabababab, 0x00007ffd, 2},
422     {NoFlag, 0xabababab, 0x00007ffd, 3},  {NoFlag, 0xabababab, 0x00007ffd, 4},
423     {NoFlag, 0xabababab, 0x00007ffd, 5},  {NoFlag, 0xabababab, 0x00007ffd, 6},
424     {NoFlag, 0xabababab, 0x00007ffd, 7},  {NoFlag, 0xabababab, 0x00007ffd, 8},
425     {NoFlag, 0xabababab, 0x00007ffd, 9},  {NoFlag, 0xabababab, 0x00007ffd, 10},
426     {NoFlag, 0xabababab, 0x00007ffd, 11}, {NoFlag, 0xabababab, 0x00007ffd, 12},
427     {NoFlag, 0xabababab, 0x00007ffd, 13}, {NoFlag, 0xabababab, 0x00007ffd, 14},
428     {NoFlag, 0xabababab, 0x00007ffd, 15}, {NoFlag, 0xabababab, 0x00007ffd, 16},
429     {NoFlag, 0xabababab, 0x00007ffd, 17}, {NoFlag, 0xabababab, 0x00007ffd, 18},
430     {NoFlag, 0xabababab, 0x00007ffd, 19}, {NoFlag, 0xabababab, 0x00007ffd, 20},
431     {NoFlag, 0xabababab, 0x00007ffd, 21}, {NoFlag, 0xabababab, 0x00007ffd, 22},
432     {NoFlag, 0xabababab, 0x00007ffd, 23}, {NoFlag, 0xabababab, 0x00007ffd, 24},
433     {NoFlag, 0xabababab, 0x00007ffd, 25}, {NoFlag, 0xabababab, 0x00007ffd, 26},
434     {NoFlag, 0xabababab, 0x00007ffd, 27}, {NoFlag, 0xabababab, 0x00007ffd, 28},
435     {NoFlag, 0xabababab, 0x00007ffd, 29}, {NoFlag, 0xabababab, 0x00007ffd, 30},
436     {NoFlag, 0xabababab, 0x00007ffd, 31}, {NoFlag, 0xabababab, 0x00007ffd, 32},
437     {NoFlag, 0xabababab, 0x00007ffe, 0},  {NoFlag, 0xabababab, 0x00007ffe, 1},
438     {NoFlag, 0xabababab, 0x00007ffe, 2},  {NoFlag, 0xabababab, 0x00007ffe, 3},
439     {NoFlag, 0xabababab, 0x00007ffe, 4},  {NoFlag, 0xabababab, 0x00007ffe, 5},
440     {NoFlag, 0xabababab, 0x00007ffe, 6},  {NoFlag, 0xabababab, 0x00007ffe, 7},
441     {NoFlag, 0xabababab, 0x00007ffe, 8},  {NoFlag, 0xabababab, 0x00007ffe, 9},
442     {NoFlag, 0xabababab, 0x00007ffe, 10}, {NoFlag, 0xabababab, 0x00007ffe, 11},
443     {NoFlag, 0xabababab, 0x00007ffe, 12}, {NoFlag, 0xabababab, 0x00007ffe, 13},
444     {NoFlag, 0xabababab, 0x00007ffe, 14}, {NoFlag, 0xabababab, 0x00007ffe, 15},
445     {NoFlag, 0xabababab, 0x00007ffe, 16}, {NoFlag, 0xabababab, 0x00007ffe, 17},
446     {NoFlag, 0xabababab, 0x00007ffe, 18}, {NoFlag, 0xabababab, 0x00007ffe, 19},
447     {NoFlag, 0xabababab, 0x00007ffe, 20}, {NoFlag, 0xabababab, 0x00007ffe, 21},
448     {NoFlag, 0xabababab, 0x00007ffe, 22}, {NoFlag, 0xabababab, 0x00007ffe, 23},
449     {NoFlag, 0xabababab, 0x00007ffe, 24}, {NoFlag, 0xabababab, 0x00007ffe, 25},
450     {NoFlag, 0xabababab, 0x00007ffe, 26}, {NoFlag, 0xabababab, 0x00007ffe, 27},
451     {NoFlag, 0xabababab, 0x00007ffe, 28}, {NoFlag, 0xabababab, 0x00007ffe, 29},
452     {NoFlag, 0xabababab, 0x00007ffe, 30}, {NoFlag, 0xabababab, 0x00007ffe, 31},
453     {NoFlag, 0xabababab, 0x00007ffe, 32}, {NoFlag, 0xabababab, 0x00007fff, 0},
454     {NoFlag, 0xabababab, 0x00007fff, 1},  {NoFlag, 0xabababab, 0x00007fff, 2},
455     {NoFlag, 0xabababab, 0x00007fff, 3},  {NoFlag, 0xabababab, 0x00007fff, 4},
456     {NoFlag, 0xabababab, 0x00007fff, 5},  {NoFlag, 0xabababab, 0x00007fff, 6},
457     {NoFlag, 0xabababab, 0x00007fff, 7},  {NoFlag, 0xabababab, 0x00007fff, 8},
458     {NoFlag, 0xabababab, 0x00007fff, 9},  {NoFlag, 0xabababab, 0x00007fff, 10},
459     {NoFlag, 0xabababab, 0x00007fff, 11}, {NoFlag, 0xabababab, 0x00007fff, 12},
460     {NoFlag, 0xabababab, 0x00007fff, 13}, {NoFlag, 0xabababab, 0x00007fff, 14},
461     {NoFlag, 0xabababab, 0x00007fff, 15}, {NoFlag, 0xabababab, 0x00007fff, 16},
462     {NoFlag, 0xabababab, 0x00007fff, 17}, {NoFlag, 0xabababab, 0x00007fff, 18},
463     {NoFlag, 0xabababab, 0x00007fff, 19}, {NoFlag, 0xabababab, 0x00007fff, 20},
464     {NoFlag, 0xabababab, 0x00007fff, 21}, {NoFlag, 0xabababab, 0x00007fff, 22},
465     {NoFlag, 0xabababab, 0x00007fff, 23}, {NoFlag, 0xabababab, 0x00007fff, 24},
466     {NoFlag, 0xabababab, 0x00007fff, 25}, {NoFlag, 0xabababab, 0x00007fff, 26},
467     {NoFlag, 0xabababab, 0x00007fff, 27}, {NoFlag, 0xabababab, 0x00007fff, 28},
468     {NoFlag, 0xabababab, 0x00007fff, 29}, {NoFlag, 0xabababab, 0x00007fff, 30},
469     {NoFlag, 0xabababab, 0x00007fff, 31}, {NoFlag, 0xabababab, 0x00007fff, 32},
470     {NoFlag, 0xabababab, 0x33333333, 0},  {NoFlag, 0xabababab, 0x33333333, 1},
471     {NoFlag, 0xabababab, 0x33333333, 2},  {NoFlag, 0xabababab, 0x33333333, 3},
472     {NoFlag, 0xabababab, 0x33333333, 4},  {NoFlag, 0xabababab, 0x33333333, 5},
473     {NoFlag, 0xabababab, 0x33333333, 6},  {NoFlag, 0xabababab, 0x33333333, 7},
474     {NoFlag, 0xabababab, 0x33333333, 8},  {NoFlag, 0xabababab, 0x33333333, 9},
475     {NoFlag, 0xabababab, 0x33333333, 10}, {NoFlag, 0xabababab, 0x33333333, 11},
476     {NoFlag, 0xabababab, 0x33333333, 12}, {NoFlag, 0xabababab, 0x33333333, 13},
477     {NoFlag, 0xabababab, 0x33333333, 14}, {NoFlag, 0xabababab, 0x33333333, 15},
478     {NoFlag, 0xabababab, 0x33333333, 16}, {NoFlag, 0xabababab, 0x33333333, 17},
479     {NoFlag, 0xabababab, 0x33333333, 18}, {NoFlag, 0xabababab, 0x33333333, 19},
480     {NoFlag, 0xabababab, 0x33333333, 20}, {NoFlag, 0xabababab, 0x33333333, 21},
481     {NoFlag, 0xabababab, 0x33333333, 22}, {NoFlag, 0xabababab, 0x33333333, 23},
482     {NoFlag, 0xabababab, 0x33333333, 24}, {NoFlag, 0xabababab, 0x33333333, 25},
483     {NoFlag, 0xabababab, 0x33333333, 26}, {NoFlag, 0xabababab, 0x33333333, 27},
484     {NoFlag, 0xabababab, 0x33333333, 28}, {NoFlag, 0xabababab, 0x33333333, 29},
485     {NoFlag, 0xabababab, 0x33333333, 30}, {NoFlag, 0xabababab, 0x33333333, 31},
486     {NoFlag, 0xabababab, 0x33333333, 32}, {NoFlag, 0xabababab, 0x55555555, 0},
487     {NoFlag, 0xabababab, 0x55555555, 1},  {NoFlag, 0xabababab, 0x55555555, 2},
488     {NoFlag, 0xabababab, 0x55555555, 3},  {NoFlag, 0xabababab, 0x55555555, 4},
489     {NoFlag, 0xabababab, 0x55555555, 5},  {NoFlag, 0xabababab, 0x55555555, 6},
490     {NoFlag, 0xabababab, 0x55555555, 7},  {NoFlag, 0xabababab, 0x55555555, 8},
491     {NoFlag, 0xabababab, 0x55555555, 9},  {NoFlag, 0xabababab, 0x55555555, 10},
492     {NoFlag, 0xabababab, 0x55555555, 11}, {NoFlag, 0xabababab, 0x55555555, 12},
493     {NoFlag, 0xabababab, 0x55555555, 13}, {NoFlag, 0xabababab, 0x55555555, 14},
494     {NoFlag, 0xabababab, 0x55555555, 15}, {NoFlag, 0xabababab, 0x55555555, 16},
495     {NoFlag, 0xabababab, 0x55555555, 17}, {NoFlag, 0xabababab, 0x55555555, 18},
496     {NoFlag, 0xabababab, 0x55555555, 19}, {NoFlag, 0xabababab, 0x55555555, 20},
497     {NoFlag, 0xabababab, 0x55555555, 21}, {NoFlag, 0xabababab, 0x55555555, 22},
498     {NoFlag, 0xabababab, 0x55555555, 23}, {NoFlag, 0xabababab, 0x55555555, 24},
499     {NoFlag, 0xabababab, 0x55555555, 25}, {NoFlag, 0xabababab, 0x55555555, 26},
500     {NoFlag, 0xabababab, 0x55555555, 27}, {NoFlag, 0xabababab, 0x55555555, 28},
501     {NoFlag, 0xabababab, 0x55555555, 29}, {NoFlag, 0xabababab, 0x55555555, 30},
502     {NoFlag, 0xabababab, 0x55555555, 31}, {NoFlag, 0xabababab, 0x55555555, 32},
503     {NoFlag, 0xabababab, 0x7ffffffd, 0},  {NoFlag, 0xabababab, 0x7ffffffd, 1},
504     {NoFlag, 0xabababab, 0x7ffffffd, 2},  {NoFlag, 0xabababab, 0x7ffffffd, 3},
505     {NoFlag, 0xabababab, 0x7ffffffd, 4},  {NoFlag, 0xabababab, 0x7ffffffd, 5},
506     {NoFlag, 0xabababab, 0x7ffffffd, 6},  {NoFlag, 0xabababab, 0x7ffffffd, 7},
507     {NoFlag, 0xabababab, 0x7ffffffd, 8},  {NoFlag, 0xabababab, 0x7ffffffd, 9},
508     {NoFlag, 0xabababab, 0x7ffffffd, 10}, {NoFlag, 0xabababab, 0x7ffffffd, 11},
509     {NoFlag, 0xabababab, 0x7ffffffd, 12}, {NoFlag, 0xabababab, 0x7ffffffd, 13},
510     {NoFlag, 0xabababab, 0x7ffffffd, 14}, {NoFlag, 0xabababab, 0x7ffffffd, 15},
511     {NoFlag, 0xabababab, 0x7ffffffd, 16}, {NoFlag, 0xabababab, 0x7ffffffd, 17},
512     {NoFlag, 0xabababab, 0x7ffffffd, 18}, {NoFlag, 0xabababab, 0x7ffffffd, 19},
513     {NoFlag, 0xabababab, 0x7ffffffd, 20}, {NoFlag, 0xabababab, 0x7ffffffd, 21},
514     {NoFlag, 0xabababab, 0x7ffffffd, 22}, {NoFlag, 0xabababab, 0x7ffffffd, 23},
515     {NoFlag, 0xabababab, 0x7ffffffd, 24}, {NoFlag, 0xabababab, 0x7ffffffd, 25},
516     {NoFlag, 0xabababab, 0x7ffffffd, 26}, {NoFlag, 0xabababab, 0x7ffffffd, 27},
517     {NoFlag, 0xabababab, 0x7ffffffd, 28}, {NoFlag, 0xabababab, 0x7ffffffd, 29},
518     {NoFlag, 0xabababab, 0x7ffffffd, 30}, {NoFlag, 0xabababab, 0x7ffffffd, 31},
519     {NoFlag, 0xabababab, 0x7ffffffd, 32}, {NoFlag, 0xabababab, 0x7ffffffe, 0},
520     {NoFlag, 0xabababab, 0x7ffffffe, 1},  {NoFlag, 0xabababab, 0x7ffffffe, 2},
521     {NoFlag, 0xabababab, 0x7ffffffe, 3},  {NoFlag, 0xabababab, 0x7ffffffe, 4},
522     {NoFlag, 0xabababab, 0x7ffffffe, 5},  {NoFlag, 0xabababab, 0x7ffffffe, 6},
523     {NoFlag, 0xabababab, 0x7ffffffe, 7},  {NoFlag, 0xabababab, 0x7ffffffe, 8},
524     {NoFlag, 0xabababab, 0x7ffffffe, 9},  {NoFlag, 0xabababab, 0x7ffffffe, 10},
525     {NoFlag, 0xabababab, 0x7ffffffe, 11}, {NoFlag, 0xabababab, 0x7ffffffe, 12},
526     {NoFlag, 0xabababab, 0x7ffffffe, 13}, {NoFlag, 0xabababab, 0x7ffffffe, 14},
527     {NoFlag, 0xabababab, 0x7ffffffe, 15}, {NoFlag, 0xabababab, 0x7ffffffe, 16},
528     {NoFlag, 0xabababab, 0x7ffffffe, 17}, {NoFlag, 0xabababab, 0x7ffffffe, 18},
529     {NoFlag, 0xabababab, 0x7ffffffe, 19}, {NoFlag, 0xabababab, 0x7ffffffe, 20},
530     {NoFlag, 0xabababab, 0x7ffffffe, 21}, {NoFlag, 0xabababab, 0x7ffffffe, 22},
531     {NoFlag, 0xabababab, 0x7ffffffe, 23}, {NoFlag, 0xabababab, 0x7ffffffe, 24},
532     {NoFlag, 0xabababab, 0x7ffffffe, 25}, {NoFlag, 0xabababab, 0x7ffffffe, 26},
533     {NoFlag, 0xabababab, 0x7ffffffe, 27}, {NoFlag, 0xabababab, 0x7ffffffe, 28},
534     {NoFlag, 0xabababab, 0x7ffffffe, 29}, {NoFlag, 0xabababab, 0x7ffffffe, 30},
535     {NoFlag, 0xabababab, 0x7ffffffe, 31}, {NoFlag, 0xabababab, 0x7ffffffe, 32},
536     {NoFlag, 0xabababab, 0x7fffffff, 0},  {NoFlag, 0xabababab, 0x7fffffff, 1},
537     {NoFlag, 0xabababab, 0x7fffffff, 2},  {NoFlag, 0xabababab, 0x7fffffff, 3},
538     {NoFlag, 0xabababab, 0x7fffffff, 4},  {NoFlag, 0xabababab, 0x7fffffff, 5},
539     {NoFlag, 0xabababab, 0x7fffffff, 6},  {NoFlag, 0xabababab, 0x7fffffff, 7},
540     {NoFlag, 0xabababab, 0x7fffffff, 8},  {NoFlag, 0xabababab, 0x7fffffff, 9},
541     {NoFlag, 0xabababab, 0x7fffffff, 10}, {NoFlag, 0xabababab, 0x7fffffff, 11},
542     {NoFlag, 0xabababab, 0x7fffffff, 12}, {NoFlag, 0xabababab, 0x7fffffff, 13},
543     {NoFlag, 0xabababab, 0x7fffffff, 14}, {NoFlag, 0xabababab, 0x7fffffff, 15},
544     {NoFlag, 0xabababab, 0x7fffffff, 16}, {NoFlag, 0xabababab, 0x7fffffff, 17},
545     {NoFlag, 0xabababab, 0x7fffffff, 18}, {NoFlag, 0xabababab, 0x7fffffff, 19},
546     {NoFlag, 0xabababab, 0x7fffffff, 20}, {NoFlag, 0xabababab, 0x7fffffff, 21},
547     {NoFlag, 0xabababab, 0x7fffffff, 22}, {NoFlag, 0xabababab, 0x7fffffff, 23},
548     {NoFlag, 0xabababab, 0x7fffffff, 24}, {NoFlag, 0xabababab, 0x7fffffff, 25},
549     {NoFlag, 0xabababab, 0x7fffffff, 26}, {NoFlag, 0xabababab, 0x7fffffff, 27},
550     {NoFlag, 0xabababab, 0x7fffffff, 28}, {NoFlag, 0xabababab, 0x7fffffff, 29},
551     {NoFlag, 0xabababab, 0x7fffffff, 30}, {NoFlag, 0xabababab, 0x7fffffff, 31},
552     {NoFlag, 0xabababab, 0x7fffffff, 32}, {NoFlag, 0xabababab, 0x80000000, 0},
553     {NoFlag, 0xabababab, 0x80000000, 1},  {NoFlag, 0xabababab, 0x80000000, 2},
554     {NoFlag, 0xabababab, 0x80000000, 3},  {NoFlag, 0xabababab, 0x80000000, 4},
555     {NoFlag, 0xabababab, 0x80000000, 5},  {NoFlag, 0xabababab, 0x80000000, 6},
556     {NoFlag, 0xabababab, 0x80000000, 7},  {NoFlag, 0xabababab, 0x80000000, 8},
557     {NoFlag, 0xabababab, 0x80000000, 9},  {NoFlag, 0xabababab, 0x80000000, 10},
558     {NoFlag, 0xabababab, 0x80000000, 11}, {NoFlag, 0xabababab, 0x80000000, 12},
559     {NoFlag, 0xabababab, 0x80000000, 13}, {NoFlag, 0xabababab, 0x80000000, 14},
560     {NoFlag, 0xabababab, 0x80000000, 15}, {NoFlag, 0xabababab, 0x80000000, 16},
561     {NoFlag, 0xabababab, 0x80000000, 17}, {NoFlag, 0xabababab, 0x80000000, 18},
562     {NoFlag, 0xabababab, 0x80000000, 19}, {NoFlag, 0xabababab, 0x80000000, 20},
563     {NoFlag, 0xabababab, 0x80000000, 21}, {NoFlag, 0xabababab, 0x80000000, 22},
564     {NoFlag, 0xabababab, 0x80000000, 23}, {NoFlag, 0xabababab, 0x80000000, 24},
565     {NoFlag, 0xabababab, 0x80000000, 25}, {NoFlag, 0xabababab, 0x80000000, 26},
566     {NoFlag, 0xabababab, 0x80000000, 27}, {NoFlag, 0xabababab, 0x80000000, 28},
567     {NoFlag, 0xabababab, 0x80000000, 29}, {NoFlag, 0xabababab, 0x80000000, 30},
568     {NoFlag, 0xabababab, 0x80000000, 31}, {NoFlag, 0xabababab, 0x80000000, 32},
569     {NoFlag, 0xabababab, 0x80000001, 0},  {NoFlag, 0xabababab, 0x80000001, 1},
570     {NoFlag, 0xabababab, 0x80000001, 2},  {NoFlag, 0xabababab, 0x80000001, 3},
571     {NoFlag, 0xabababab, 0x80000001, 4},  {NoFlag, 0xabababab, 0x80000001, 5},
572     {NoFlag, 0xabababab, 0x80000001, 6},  {NoFlag, 0xabababab, 0x80000001, 7},
573     {NoFlag, 0xabababab, 0x80000001, 8},  {NoFlag, 0xabababab, 0x80000001, 9},
574     {NoFlag, 0xabababab, 0x80000001, 10}, {NoFlag, 0xabababab, 0x80000001, 11},
575     {NoFlag, 0xabababab, 0x80000001, 12}, {NoFlag, 0xabababab, 0x80000001, 13},
576     {NoFlag, 0xabababab, 0x80000001, 14}, {NoFlag, 0xabababab, 0x80000001, 15},
577     {NoFlag, 0xabababab, 0x80000001, 16}, {NoFlag, 0xabababab, 0x80000001, 17},
578     {NoFlag, 0xabababab, 0x80000001, 18}, {NoFlag, 0xabababab, 0x80000001, 19},
579     {NoFlag, 0xabababab, 0x80000001, 20}, {NoFlag, 0xabababab, 0x80000001, 21},
580     {NoFlag, 0xabababab, 0x80000001, 22}, {NoFlag, 0xabababab, 0x80000001, 23},
581     {NoFlag, 0xabababab, 0x80000001, 24}, {NoFlag, 0xabababab, 0x80000001, 25},
582     {NoFlag, 0xabababab, 0x80000001, 26}, {NoFlag, 0xabababab, 0x80000001, 27},
583     {NoFlag, 0xabababab, 0x80000001, 28}, {NoFlag, 0xabababab, 0x80000001, 29},
584     {NoFlag, 0xabababab, 0x80000001, 30}, {NoFlag, 0xabababab, 0x80000001, 31},
585     {NoFlag, 0xabababab, 0x80000001, 32}, {NoFlag, 0xabababab, 0xaaaaaaaa, 0},
586     {NoFlag, 0xabababab, 0xaaaaaaaa, 1},  {NoFlag, 0xabababab, 0xaaaaaaaa, 2},
587     {NoFlag, 0xabababab, 0xaaaaaaaa, 3},  {NoFlag, 0xabababab, 0xaaaaaaaa, 4},
588     {NoFlag, 0xabababab, 0xaaaaaaaa, 5},  {NoFlag, 0xabababab, 0xaaaaaaaa, 6},
589     {NoFlag, 0xabababab, 0xaaaaaaaa, 7},  {NoFlag, 0xabababab, 0xaaaaaaaa, 8},
590     {NoFlag, 0xabababab, 0xaaaaaaaa, 9},  {NoFlag, 0xabababab, 0xaaaaaaaa, 10},
591     {NoFlag, 0xabababab, 0xaaaaaaaa, 11}, {NoFlag, 0xabababab, 0xaaaaaaaa, 12},
592     {NoFlag, 0xabababab, 0xaaaaaaaa, 13}, {NoFlag, 0xabababab, 0xaaaaaaaa, 14},
593     {NoFlag, 0xabababab, 0xaaaaaaaa, 15}, {NoFlag, 0xabababab, 0xaaaaaaaa, 16},
594     {NoFlag, 0xabababab, 0xaaaaaaaa, 17}, {NoFlag, 0xabababab, 0xaaaaaaaa, 18},
595     {NoFlag, 0xabababab, 0xaaaaaaaa, 19}, {NoFlag, 0xabababab, 0xaaaaaaaa, 20},
596     {NoFlag, 0xabababab, 0xaaaaaaaa, 21}, {NoFlag, 0xabababab, 0xaaaaaaaa, 22},
597     {NoFlag, 0xabababab, 0xaaaaaaaa, 23}, {NoFlag, 0xabababab, 0xaaaaaaaa, 24},
598     {NoFlag, 0xabababab, 0xaaaaaaaa, 25}, {NoFlag, 0xabababab, 0xaaaaaaaa, 26},
599     {NoFlag, 0xabababab, 0xaaaaaaaa, 27}, {NoFlag, 0xabababab, 0xaaaaaaaa, 28},
600     {NoFlag, 0xabababab, 0xaaaaaaaa, 29}, {NoFlag, 0xabababab, 0xaaaaaaaa, 30},
601     {NoFlag, 0xabababab, 0xaaaaaaaa, 31}, {NoFlag, 0xabababab, 0xaaaaaaaa, 32},
602     {NoFlag, 0xabababab, 0xcccccccc, 0},  {NoFlag, 0xabababab, 0xcccccccc, 1},
603     {NoFlag, 0xabababab, 0xcccccccc, 2},  {NoFlag, 0xabababab, 0xcccccccc, 3},
604     {NoFlag, 0xabababab, 0xcccccccc, 4},  {NoFlag, 0xabababab, 0xcccccccc, 5},
605     {NoFlag, 0xabababab, 0xcccccccc, 6},  {NoFlag, 0xabababab, 0xcccccccc, 7},
606     {NoFlag, 0xabababab, 0xcccccccc, 8},  {NoFlag, 0xabababab, 0xcccccccc, 9},
607     {NoFlag, 0xabababab, 0xcccccccc, 10}, {NoFlag, 0xabababab, 0xcccccccc, 11},
608     {NoFlag, 0xabababab, 0xcccccccc, 12}, {NoFlag, 0xabababab, 0xcccccccc, 13},
609     {NoFlag, 0xabababab, 0xcccccccc, 14}, {NoFlag, 0xabababab, 0xcccccccc, 15},
610     {NoFlag, 0xabababab, 0xcccccccc, 16}, {NoFlag, 0xabababab, 0xcccccccc, 17},
611     {NoFlag, 0xabababab, 0xcccccccc, 18}, {NoFlag, 0xabababab, 0xcccccccc, 19},
612     {NoFlag, 0xabababab, 0xcccccccc, 20}, {NoFlag, 0xabababab, 0xcccccccc, 21},
613     {NoFlag, 0xabababab, 0xcccccccc, 22}, {NoFlag, 0xabababab, 0xcccccccc, 23},
614     {NoFlag, 0xabababab, 0xcccccccc, 24}, {NoFlag, 0xabababab, 0xcccccccc, 25},
615     {NoFlag, 0xabababab, 0xcccccccc, 26}, {NoFlag, 0xabababab, 0xcccccccc, 27},
616     {NoFlag, 0xabababab, 0xcccccccc, 28}, {NoFlag, 0xabababab, 0xcccccccc, 29},
617     {NoFlag, 0xabababab, 0xcccccccc, 30}, {NoFlag, 0xabababab, 0xcccccccc, 31},
618     {NoFlag, 0xabababab, 0xcccccccc, 32}, {NoFlag, 0xabababab, 0xffff8000, 0},
619     {NoFlag, 0xabababab, 0xffff8000, 1},  {NoFlag, 0xabababab, 0xffff8000, 2},
620     {NoFlag, 0xabababab, 0xffff8000, 3},  {NoFlag, 0xabababab, 0xffff8000, 4},
621     {NoFlag, 0xabababab, 0xffff8000, 5},  {NoFlag, 0xabababab, 0xffff8000, 6},
622     {NoFlag, 0xabababab, 0xffff8000, 7},  {NoFlag, 0xabababab, 0xffff8000, 8},
623     {NoFlag, 0xabababab, 0xffff8000, 9},  {NoFlag, 0xabababab, 0xffff8000, 10},
624     {NoFlag, 0xabababab, 0xffff8000, 11}, {NoFlag, 0xabababab, 0xffff8000, 12},
625     {NoFlag, 0xabababab, 0xffff8000, 13}, {NoFlag, 0xabababab, 0xffff8000, 14},
626     {NoFlag, 0xabababab, 0xffff8000, 15}, {NoFlag, 0xabababab, 0xffff8000, 16},
627     {NoFlag, 0xabababab, 0xffff8000, 17}, {NoFlag, 0xabababab, 0xffff8000, 18},
628     {NoFlag, 0xabababab, 0xffff8000, 19}, {NoFlag, 0xabababab, 0xffff8000, 20},
629     {NoFlag, 0xabababab, 0xffff8000, 21}, {NoFlag, 0xabababab, 0xffff8000, 22},
630     {NoFlag, 0xabababab, 0xffff8000, 23}, {NoFlag, 0xabababab, 0xffff8000, 24},
631     {NoFlag, 0xabababab, 0xffff8000, 25}, {NoFlag, 0xabababab, 0xffff8000, 26},
632     {NoFlag, 0xabababab, 0xffff8000, 27}, {NoFlag, 0xabababab, 0xffff8000, 28},
633     {NoFlag, 0xabababab, 0xffff8000, 29}, {NoFlag, 0xabababab, 0xffff8000, 30},
634     {NoFlag, 0xabababab, 0xffff8000, 31}, {NoFlag, 0xabababab, 0xffff8000, 32},
635     {NoFlag, 0xabababab, 0xffff8001, 0},  {NoFlag, 0xabababab, 0xffff8001, 1},
636     {NoFlag, 0xabababab, 0xffff8001, 2},  {NoFlag, 0xabababab, 0xffff8001, 3},
637     {NoFlag, 0xabababab, 0xffff8001, 4},  {NoFlag, 0xabababab, 0xffff8001, 5},
638     {NoFlag, 0xabababab, 0xffff8001, 6},  {NoFlag, 0xabababab, 0xffff8001, 7},
639     {NoFlag, 0xabababab, 0xffff8001, 8},  {NoFlag, 0xabababab, 0xffff8001, 9},
640     {NoFlag, 0xabababab, 0xffff8001, 10}, {NoFlag, 0xabababab, 0xffff8001, 11},
641     {NoFlag, 0xabababab, 0xffff8001, 12}, {NoFlag, 0xabababab, 0xffff8001, 13},
642     {NoFlag, 0xabababab, 0xffff8001, 14}, {NoFlag, 0xabababab, 0xffff8001, 15},
643     {NoFlag, 0xabababab, 0xffff8001, 16}, {NoFlag, 0xabababab, 0xffff8001, 17},
644     {NoFlag, 0xabababab, 0xffff8001, 18}, {NoFlag, 0xabababab, 0xffff8001, 19},
645     {NoFlag, 0xabababab, 0xffff8001, 20}, {NoFlag, 0xabababab, 0xffff8001, 21},
646     {NoFlag, 0xabababab, 0xffff8001, 22}, {NoFlag, 0xabababab, 0xffff8001, 23},
647     {NoFlag, 0xabababab, 0xffff8001, 24}, {NoFlag, 0xabababab, 0xffff8001, 25},
648     {NoFlag, 0xabababab, 0xffff8001, 26}, {NoFlag, 0xabababab, 0xffff8001, 27},
649     {NoFlag, 0xabababab, 0xffff8001, 28}, {NoFlag, 0xabababab, 0xffff8001, 29},
650     {NoFlag, 0xabababab, 0xffff8001, 30}, {NoFlag, 0xabababab, 0xffff8001, 31},
651     {NoFlag, 0xabababab, 0xffff8001, 32}, {NoFlag, 0xabababab, 0xffff8002, 0},
652     {NoFlag, 0xabababab, 0xffff8002, 1},  {NoFlag, 0xabababab, 0xffff8002, 2},
653     {NoFlag, 0xabababab, 0xffff8002, 3},  {NoFlag, 0xabababab, 0xffff8002, 4},
654     {NoFlag, 0xabababab, 0xffff8002, 5},  {NoFlag, 0xabababab, 0xffff8002, 6},
655     {NoFlag, 0xabababab, 0xffff8002, 7},  {NoFlag, 0xabababab, 0xffff8002, 8},
656     {NoFlag, 0xabababab, 0xffff8002, 9},  {NoFlag, 0xabababab, 0xffff8002, 10},
657     {NoFlag, 0xabababab, 0xffff8002, 11}, {NoFlag, 0xabababab, 0xffff8002, 12},
658     {NoFlag, 0xabababab, 0xffff8002, 13}, {NoFlag, 0xabababab, 0xffff8002, 14},
659     {NoFlag, 0xabababab, 0xffff8002, 15}, {NoFlag, 0xabababab, 0xffff8002, 16},
660     {NoFlag, 0xabababab, 0xffff8002, 17}, {NoFlag, 0xabababab, 0xffff8002, 18},
661     {NoFlag, 0xabababab, 0xffff8002, 19}, {NoFlag, 0xabababab, 0xffff8002, 20},
662     {NoFlag, 0xabababab, 0xffff8002, 21}, {NoFlag, 0xabababab, 0xffff8002, 22},
663     {NoFlag, 0xabababab, 0xffff8002, 23}, {NoFlag, 0xabababab, 0xffff8002, 24},
664     {NoFlag, 0xabababab, 0xffff8002, 25}, {NoFlag, 0xabababab, 0xffff8002, 26},
665     {NoFlag, 0xabababab, 0xffff8002, 27}, {NoFlag, 0xabababab, 0xffff8002, 28},
666     {NoFlag, 0xabababab, 0xffff8002, 29}, {NoFlag, 0xabababab, 0xffff8002, 30},
667     {NoFlag, 0xabababab, 0xffff8002, 31}, {NoFlag, 0xabababab, 0xffff8002, 32},
668     {NoFlag, 0xabababab, 0xffff8003, 0},  {NoFlag, 0xabababab, 0xffff8003, 1},
669     {NoFlag, 0xabababab, 0xffff8003, 2},  {NoFlag, 0xabababab, 0xffff8003, 3},
670     {NoFlag, 0xabababab, 0xffff8003, 4},  {NoFlag, 0xabababab, 0xffff8003, 5},
671     {NoFlag, 0xabababab, 0xffff8003, 6},  {NoFlag, 0xabababab, 0xffff8003, 7},
672     {NoFlag, 0xabababab, 0xffff8003, 8},  {NoFlag, 0xabababab, 0xffff8003, 9},
673     {NoFlag, 0xabababab, 0xffff8003, 10}, {NoFlag, 0xabababab, 0xffff8003, 11},
674     {NoFlag, 0xabababab, 0xffff8003, 12}, {NoFlag, 0xabababab, 0xffff8003, 13},
675     {NoFlag, 0xabababab, 0xffff8003, 14}, {NoFlag, 0xabababab, 0xffff8003, 15},
676     {NoFlag, 0xabababab, 0xffff8003, 16}, {NoFlag, 0xabababab, 0xffff8003, 17},
677     {NoFlag, 0xabababab, 0xffff8003, 18}, {NoFlag, 0xabababab, 0xffff8003, 19},
678     {NoFlag, 0xabababab, 0xffff8003, 20}, {NoFlag, 0xabababab, 0xffff8003, 21},
679     {NoFlag, 0xabababab, 0xffff8003, 22}, {NoFlag, 0xabababab, 0xffff8003, 23},
680     {NoFlag, 0xabababab, 0xffff8003, 24}, {NoFlag, 0xabababab, 0xffff8003, 25},
681     {NoFlag, 0xabababab, 0xffff8003, 26}, {NoFlag, 0xabababab, 0xffff8003, 27},
682     {NoFlag, 0xabababab, 0xffff8003, 28}, {NoFlag, 0xabababab, 0xffff8003, 29},
683     {NoFlag, 0xabababab, 0xffff8003, 30}, {NoFlag, 0xabababab, 0xffff8003, 31},
684     {NoFlag, 0xabababab, 0xffff8003, 32}, {NoFlag, 0xabababab, 0xffffff80, 0},
685     {NoFlag, 0xabababab, 0xffffff80, 1},  {NoFlag, 0xabababab, 0xffffff80, 2},
686     {NoFlag, 0xabababab, 0xffffff80, 3},  {NoFlag, 0xabababab, 0xffffff80, 4},
687     {NoFlag, 0xabababab, 0xffffff80, 5},  {NoFlag, 0xabababab, 0xffffff80, 6},
688     {NoFlag, 0xabababab, 0xffffff80, 7},  {NoFlag, 0xabababab, 0xffffff80, 8},
689     {NoFlag, 0xabababab, 0xffffff80, 9},  {NoFlag, 0xabababab, 0xffffff80, 10},
690     {NoFlag, 0xabababab, 0xffffff80, 11}, {NoFlag, 0xabababab, 0xffffff80, 12},
691     {NoFlag, 0xabababab, 0xffffff80, 13}, {NoFlag, 0xabababab, 0xffffff80, 14},
692     {NoFlag, 0xabababab, 0xffffff80, 15}, {NoFlag, 0xabababab, 0xffffff80, 16},
693     {NoFlag, 0xabababab, 0xffffff80, 17}, {NoFlag, 0xabababab, 0xffffff80, 18},
694     {NoFlag, 0xabababab, 0xffffff80, 19}, {NoFlag, 0xabababab, 0xffffff80, 20},
695     {NoFlag, 0xabababab, 0xffffff80, 21}, {NoFlag, 0xabababab, 0xffffff80, 22},
696     {NoFlag, 0xabababab, 0xffffff80, 23}, {NoFlag, 0xabababab, 0xffffff80, 24},
697     {NoFlag, 0xabababab, 0xffffff80, 25}, {NoFlag, 0xabababab, 0xffffff80, 26},
698     {NoFlag, 0xabababab, 0xffffff80, 27}, {NoFlag, 0xabababab, 0xffffff80, 28},
699     {NoFlag, 0xabababab, 0xffffff80, 29}, {NoFlag, 0xabababab, 0xffffff80, 30},
700     {NoFlag, 0xabababab, 0xffffff80, 31}, {NoFlag, 0xabababab, 0xffffff80, 32},
701     {NoFlag, 0xabababab, 0xffffff81, 0},  {NoFlag, 0xabababab, 0xffffff81, 1},
702     {NoFlag, 0xabababab, 0xffffff81, 2},  {NoFlag, 0xabababab, 0xffffff81, 3},
703     {NoFlag, 0xabababab, 0xffffff81, 4},  {NoFlag, 0xabababab, 0xffffff81, 5},
704     {NoFlag, 0xabababab, 0xffffff81, 6},  {NoFlag, 0xabababab, 0xffffff81, 7},
705     {NoFlag, 0xabababab, 0xffffff81, 8},  {NoFlag, 0xabababab, 0xffffff81, 9},
706     {NoFlag, 0xabababab, 0xffffff81, 10}, {NoFlag, 0xabababab, 0xffffff81, 11},
707     {NoFlag, 0xabababab, 0xffffff81, 12}, {NoFlag, 0xabababab, 0xffffff81, 13},
708     {NoFlag, 0xabababab, 0xffffff81, 14}, {NoFlag, 0xabababab, 0xffffff81, 15},
709     {NoFlag, 0xabababab, 0xffffff81, 16}, {NoFlag, 0xabababab, 0xffffff81, 17},
710     {NoFlag, 0xabababab, 0xffffff81, 18}, {NoFlag, 0xabababab, 0xffffff81, 19},
711     {NoFlag, 0xabababab, 0xffffff81, 20}, {NoFlag, 0xabababab, 0xffffff81, 21},
712     {NoFlag, 0xabababab, 0xffffff81, 22}, {NoFlag, 0xabababab, 0xffffff81, 23},
713     {NoFlag, 0xabababab, 0xffffff81, 24}, {NoFlag, 0xabababab, 0xffffff81, 25},
714     {NoFlag, 0xabababab, 0xffffff81, 26}, {NoFlag, 0xabababab, 0xffffff81, 27},
715     {NoFlag, 0xabababab, 0xffffff81, 28}, {NoFlag, 0xabababab, 0xffffff81, 29},
716     {NoFlag, 0xabababab, 0xffffff81, 30}, {NoFlag, 0xabababab, 0xffffff81, 31},
717     {NoFlag, 0xabababab, 0xffffff81, 32}, {NoFlag, 0xabababab, 0xffffff82, 0},
718     {NoFlag, 0xabababab, 0xffffff82, 1},  {NoFlag, 0xabababab, 0xffffff82, 2},
719     {NoFlag, 0xabababab, 0xffffff82, 3},  {NoFlag, 0xabababab, 0xffffff82, 4},
720     {NoFlag, 0xabababab, 0xffffff82, 5},  {NoFlag, 0xabababab, 0xffffff82, 6},
721     {NoFlag, 0xabababab, 0xffffff82, 7},  {NoFlag, 0xabababab, 0xffffff82, 8},
722     {NoFlag, 0xabababab, 0xffffff82, 9},  {NoFlag, 0xabababab, 0xffffff82, 10},
723     {NoFlag, 0xabababab, 0xffffff82, 11}, {NoFlag, 0xabababab, 0xffffff82, 12},
724     {NoFlag, 0xabababab, 0xffffff82, 13}, {NoFlag, 0xabababab, 0xffffff82, 14},
725     {NoFlag, 0xabababab, 0xffffff82, 15}, {NoFlag, 0xabababab, 0xffffff82, 16},
726     {NoFlag, 0xabababab, 0xffffff82, 17}, {NoFlag, 0xabababab, 0xffffff82, 18},
727     {NoFlag, 0xabababab, 0xffffff82, 19}, {NoFlag, 0xabababab, 0xffffff82, 20},
728     {NoFlag, 0xabababab, 0xffffff82, 21}, {NoFlag, 0xabababab, 0xffffff82, 22},
729     {NoFlag, 0xabababab, 0xffffff82, 23}, {NoFlag, 0xabababab, 0xffffff82, 24},
730     {NoFlag, 0xabababab, 0xffffff82, 25}, {NoFlag, 0xabababab, 0xffffff82, 26},
731     {NoFlag, 0xabababab, 0xffffff82, 27}, {NoFlag, 0xabababab, 0xffffff82, 28},
732     {NoFlag, 0xabababab, 0xffffff82, 29}, {NoFlag, 0xabababab, 0xffffff82, 30},
733     {NoFlag, 0xabababab, 0xffffff82, 31}, {NoFlag, 0xabababab, 0xffffff82, 32},
734     {NoFlag, 0xabababab, 0xffffff83, 0},  {NoFlag, 0xabababab, 0xffffff83, 1},
735     {NoFlag, 0xabababab, 0xffffff83, 2},  {NoFlag, 0xabababab, 0xffffff83, 3},
736     {NoFlag, 0xabababab, 0xffffff83, 4},  {NoFlag, 0xabababab, 0xffffff83, 5},
737     {NoFlag, 0xabababab, 0xffffff83, 6},  {NoFlag, 0xabababab, 0xffffff83, 7},
738     {NoFlag, 0xabababab, 0xffffff83, 8},  {NoFlag, 0xabababab, 0xffffff83, 9},
739     {NoFlag, 0xabababab, 0xffffff83, 10}, {NoFlag, 0xabababab, 0xffffff83, 11},
740     {NoFlag, 0xabababab, 0xffffff83, 12}, {NoFlag, 0xabababab, 0xffffff83, 13},
741     {NoFlag, 0xabababab, 0xffffff83, 14}, {NoFlag, 0xabababab, 0xffffff83, 15},
742     {NoFlag, 0xabababab, 0xffffff83, 16}, {NoFlag, 0xabababab, 0xffffff83, 17},
743     {NoFlag, 0xabababab, 0xffffff83, 18}, {NoFlag, 0xabababab, 0xffffff83, 19},
744     {NoFlag, 0xabababab, 0xffffff83, 20}, {NoFlag, 0xabababab, 0xffffff83, 21},
745     {NoFlag, 0xabababab, 0xffffff83, 22}, {NoFlag, 0xabababab, 0xffffff83, 23},
746     {NoFlag, 0xabababab, 0xffffff83, 24}, {NoFlag, 0xabababab, 0xffffff83, 25},
747     {NoFlag, 0xabababab, 0xffffff83, 26}, {NoFlag, 0xabababab, 0xffffff83, 27},
748     {NoFlag, 0xabababab, 0xffffff83, 28}, {NoFlag, 0xabababab, 0xffffff83, 29},
749     {NoFlag, 0xabababab, 0xffffff83, 30}, {NoFlag, 0xabababab, 0xffffff83, 31},
750     {NoFlag, 0xabababab, 0xffffff83, 32}, {NoFlag, 0xabababab, 0xffffffe0, 0},
751     {NoFlag, 0xabababab, 0xffffffe0, 1},  {NoFlag, 0xabababab, 0xffffffe0, 2},
752     {NoFlag, 0xabababab, 0xffffffe0, 3},  {NoFlag, 0xabababab, 0xffffffe0, 4},
753     {NoFlag, 0xabababab, 0xffffffe0, 5},  {NoFlag, 0xabababab, 0xffffffe0, 6},
754     {NoFlag, 0xabababab, 0xffffffe0, 7},  {NoFlag, 0xabababab, 0xffffffe0, 8},
755     {NoFlag, 0xabababab, 0xffffffe0, 9},  {NoFlag, 0xabababab, 0xffffffe0, 10},
756     {NoFlag, 0xabababab, 0xffffffe0, 11}, {NoFlag, 0xabababab, 0xffffffe0, 12},
757     {NoFlag, 0xabababab, 0xffffffe0, 13}, {NoFlag, 0xabababab, 0xffffffe0, 14},
758     {NoFlag, 0xabababab, 0xffffffe0, 15}, {NoFlag, 0xabababab, 0xffffffe0, 16},
759     {NoFlag, 0xabababab, 0xffffffe0, 17}, {NoFlag, 0xabababab, 0xffffffe0, 18},
760     {NoFlag, 0xabababab, 0xffffffe0, 19}, {NoFlag, 0xabababab, 0xffffffe0, 20},
761     {NoFlag, 0xabababab, 0xffffffe0, 21}, {NoFlag, 0xabababab, 0xffffffe0, 22},
762     {NoFlag, 0xabababab, 0xffffffe0, 23}, {NoFlag, 0xabababab, 0xffffffe0, 24},
763     {NoFlag, 0xabababab, 0xffffffe0, 25}, {NoFlag, 0xabababab, 0xffffffe0, 26},
764     {NoFlag, 0xabababab, 0xffffffe0, 27}, {NoFlag, 0xabababab, 0xffffffe0, 28},
765     {NoFlag, 0xabababab, 0xffffffe0, 29}, {NoFlag, 0xabababab, 0xffffffe0, 30},
766     {NoFlag, 0xabababab, 0xffffffe0, 31}, {NoFlag, 0xabababab, 0xffffffe0, 32},
767     {NoFlag, 0xabababab, 0xfffffffd, 0},  {NoFlag, 0xabababab, 0xfffffffd, 1},
768     {NoFlag, 0xabababab, 0xfffffffd, 2},  {NoFlag, 0xabababab, 0xfffffffd, 3},
769     {NoFlag, 0xabababab, 0xfffffffd, 4},  {NoFlag, 0xabababab, 0xfffffffd, 5},
770     {NoFlag, 0xabababab, 0xfffffffd, 6},  {NoFlag, 0xabababab, 0xfffffffd, 7},
771     {NoFlag, 0xabababab, 0xfffffffd, 8},  {NoFlag, 0xabababab, 0xfffffffd, 9},
772     {NoFlag, 0xabababab, 0xfffffffd, 10}, {NoFlag, 0xabababab, 0xfffffffd, 11},
773     {NoFlag, 0xabababab, 0xfffffffd, 12}, {NoFlag, 0xabababab, 0xfffffffd, 13},
774     {NoFlag, 0xabababab, 0xfffffffd, 14}, {NoFlag, 0xabababab, 0xfffffffd, 15},
775     {NoFlag, 0xabababab, 0xfffffffd, 16}, {NoFlag, 0xabababab, 0xfffffffd, 17},
776     {NoFlag, 0xabababab, 0xfffffffd, 18}, {NoFlag, 0xabababab, 0xfffffffd, 19},
777     {NoFlag, 0xabababab, 0xfffffffd, 20}, {NoFlag, 0xabababab, 0xfffffffd, 21},
778     {NoFlag, 0xabababab, 0xfffffffd, 22}, {NoFlag, 0xabababab, 0xfffffffd, 23},
779     {NoFlag, 0xabababab, 0xfffffffd, 24}, {NoFlag, 0xabababab, 0xfffffffd, 25},
780     {NoFlag, 0xabababab, 0xfffffffd, 26}, {NoFlag, 0xabababab, 0xfffffffd, 27},
781     {NoFlag, 0xabababab, 0xfffffffd, 28}, {NoFlag, 0xabababab, 0xfffffffd, 29},
782     {NoFlag, 0xabababab, 0xfffffffd, 30}, {NoFlag, 0xabababab, 0xfffffffd, 31},
783     {NoFlag, 0xabababab, 0xfffffffd, 32}, {NoFlag, 0xabababab, 0xfffffffe, 0},
784     {NoFlag, 0xabababab, 0xfffffffe, 1},  {NoFlag, 0xabababab, 0xfffffffe, 2},
785     {NoFlag, 0xabababab, 0xfffffffe, 3},  {NoFlag, 0xabababab, 0xfffffffe, 4},
786     {NoFlag, 0xabababab, 0xfffffffe, 5},  {NoFlag, 0xabababab, 0xfffffffe, 6},
787     {NoFlag, 0xabababab, 0xfffffffe, 7},  {NoFlag, 0xabababab, 0xfffffffe, 8},
788     {NoFlag, 0xabababab, 0xfffffffe, 9},  {NoFlag, 0xabababab, 0xfffffffe, 10},
789     {NoFlag, 0xabababab, 0xfffffffe, 11}, {NoFlag, 0xabababab, 0xfffffffe, 12},
790     {NoFlag, 0xabababab, 0xfffffffe, 13}, {NoFlag, 0xabababab, 0xfffffffe, 14},
791     {NoFlag, 0xabababab, 0xfffffffe, 15}, {NoFlag, 0xabababab, 0xfffffffe, 16},
792     {NoFlag, 0xabababab, 0xfffffffe, 17}, {NoFlag, 0xabababab, 0xfffffffe, 18},
793     {NoFlag, 0xabababab, 0xfffffffe, 19}, {NoFlag, 0xabababab, 0xfffffffe, 20},
794     {NoFlag, 0xabababab, 0xfffffffe, 21}, {NoFlag, 0xabababab, 0xfffffffe, 22},
795     {NoFlag, 0xabababab, 0xfffffffe, 23}, {NoFlag, 0xabababab, 0xfffffffe, 24},
796     {NoFlag, 0xabababab, 0xfffffffe, 25}, {NoFlag, 0xabababab, 0xfffffffe, 26},
797     {NoFlag, 0xabababab, 0xfffffffe, 27}, {NoFlag, 0xabababab, 0xfffffffe, 28},
798     {NoFlag, 0xabababab, 0xfffffffe, 29}, {NoFlag, 0xabababab, 0xfffffffe, 30},
799     {NoFlag, 0xabababab, 0xfffffffe, 31}, {NoFlag, 0xabababab, 0xfffffffe, 32},
800     {NoFlag, 0xabababab, 0xffffffff, 0},  {NoFlag, 0xabababab, 0xffffffff, 1},
801     {NoFlag, 0xabababab, 0xffffffff, 2},  {NoFlag, 0xabababab, 0xffffffff, 3},
802     {NoFlag, 0xabababab, 0xffffffff, 4},  {NoFlag, 0xabababab, 0xffffffff, 5},
803     {NoFlag, 0xabababab, 0xffffffff, 6},  {NoFlag, 0xabababab, 0xffffffff, 7},
804     {NoFlag, 0xabababab, 0xffffffff, 8},  {NoFlag, 0xabababab, 0xffffffff, 9},
805     {NoFlag, 0xabababab, 0xffffffff, 10}, {NoFlag, 0xabababab, 0xffffffff, 11},
806     {NoFlag, 0xabababab, 0xffffffff, 12}, {NoFlag, 0xabababab, 0xffffffff, 13},
807     {NoFlag, 0xabababab, 0xffffffff, 14}, {NoFlag, 0xabababab, 0xffffffff, 15},
808     {NoFlag, 0xabababab, 0xffffffff, 16}, {NoFlag, 0xabababab, 0xffffffff, 17},
809     {NoFlag, 0xabababab, 0xffffffff, 18}, {NoFlag, 0xabababab, 0xffffffff, 19},
810     {NoFlag, 0xabababab, 0xffffffff, 20}, {NoFlag, 0xabababab, 0xffffffff, 21},
811     {NoFlag, 0xabababab, 0xffffffff, 22}, {NoFlag, 0xabababab, 0xffffffff, 23},
812     {NoFlag, 0xabababab, 0xffffffff, 24}, {NoFlag, 0xabababab, 0xffffffff, 25},
813     {NoFlag, 0xabababab, 0xffffffff, 26}, {NoFlag, 0xabababab, 0xffffffff, 27},
814     {NoFlag, 0xabababab, 0xffffffff, 28}, {NoFlag, 0xabababab, 0xffffffff, 29},
815     {NoFlag, 0xabababab, 0xffffffff, 30}, {NoFlag, 0xabababab, 0xffffffff, 31},
816     {NoFlag, 0xabababab, 0xffffffff, 32}};
817
818
819// A loop will be generated for each element of this array.
820const TestLoopData kTests[] = {{{eq, r0, r0, LSL, r0},
821                                "eq r0 r0 LSL r0",
822                                "Condition_eq_r0_r0_LSL_r0",
823                                ARRAY_SIZE(kCondition),
824                                kCondition},
825                               {{ne, r0, r0, LSL, r0},
826                                "ne r0 r0 LSL r0",
827                                "Condition_ne_r0_r0_LSL_r0",
828                                ARRAY_SIZE(kCondition),
829                                kCondition},
830                               {{cs, r0, r0, LSL, r0},
831                                "cs r0 r0 LSL r0",
832                                "Condition_cs_r0_r0_LSL_r0",
833                                ARRAY_SIZE(kCondition),
834                                kCondition},
835                               {{cc, r0, r0, LSL, r0},
836                                "cc r0 r0 LSL r0",
837                                "Condition_cc_r0_r0_LSL_r0",
838                                ARRAY_SIZE(kCondition),
839                                kCondition},
840                               {{mi, r0, r0, LSL, r0},
841                                "mi r0 r0 LSL r0",
842                                "Condition_mi_r0_r0_LSL_r0",
843                                ARRAY_SIZE(kCondition),
844                                kCondition},
845                               {{pl, r0, r0, LSL, r0},
846                                "pl r0 r0 LSL r0",
847                                "Condition_pl_r0_r0_LSL_r0",
848                                ARRAY_SIZE(kCondition),
849                                kCondition},
850                               {{vs, r0, r0, LSL, r0},
851                                "vs r0 r0 LSL r0",
852                                "Condition_vs_r0_r0_LSL_r0",
853                                ARRAY_SIZE(kCondition),
854                                kCondition},
855                               {{vc, r0, r0, LSL, r0},
856                                "vc r0 r0 LSL r0",
857                                "Condition_vc_r0_r0_LSL_r0",
858                                ARRAY_SIZE(kCondition),
859                                kCondition},
860                               {{hi, r0, r0, LSL, r0},
861                                "hi r0 r0 LSL r0",
862                                "Condition_hi_r0_r0_LSL_r0",
863                                ARRAY_SIZE(kCondition),
864                                kCondition},
865                               {{ls, r0, r0, LSL, r0},
866                                "ls r0 r0 LSL r0",
867                                "Condition_ls_r0_r0_LSL_r0",
868                                ARRAY_SIZE(kCondition),
869                                kCondition},
870                               {{ge, r0, r0, LSL, r0},
871                                "ge r0 r0 LSL r0",
872                                "Condition_ge_r0_r0_LSL_r0",
873                                ARRAY_SIZE(kCondition),
874                                kCondition},
875                               {{lt, r0, r0, LSL, r0},
876                                "lt r0 r0 LSL r0",
877                                "Condition_lt_r0_r0_LSL_r0",
878                                ARRAY_SIZE(kCondition),
879                                kCondition},
880                               {{gt, r0, r0, LSL, r0},
881                                "gt r0 r0 LSL r0",
882                                "Condition_gt_r0_r0_LSL_r0",
883                                ARRAY_SIZE(kCondition),
884                                kCondition},
885                               {{le, r0, r0, LSL, r0},
886                                "le r0 r0 LSL r0",
887                                "Condition_le_r0_r0_LSL_r0",
888                                ARRAY_SIZE(kCondition),
889                                kCondition},
890                               {{al, r0, r0, LSL, r0},
891                                "al r0 r0 LSL r0",
892                                "Condition_al_r0_r0_LSL_r0",
893                                ARRAY_SIZE(kCondition),
894                                kCondition},
895                               {{al, r0, r0, LSL, r0},
896                                "al r0 r0 LSL r0",
897                                "RdIsRn_al_r0_r0_LSL_r0",
898                                ARRAY_SIZE(kRdIsRn),
899                                kRdIsRn},
900                               {{al, r1, r1, LSL, r0},
901                                "al r1 r1 LSL r0",
902                                "RdIsRn_al_r1_r1_LSL_r0",
903                                ARRAY_SIZE(kRdIsRn),
904                                kRdIsRn},
905                               {{al, r2, r2, LSL, r0},
906                                "al r2 r2 LSL r0",
907                                "RdIsRn_al_r2_r2_LSL_r0",
908                                ARRAY_SIZE(kRdIsRn),
909                                kRdIsRn},
910                               {{al, r3, r3, LSL, r0},
911                                "al r3 r3 LSL r0",
912                                "RdIsRn_al_r3_r3_LSL_r0",
913                                ARRAY_SIZE(kRdIsRn),
914                                kRdIsRn},
915                               {{al, r4, r4, LSL, r0},
916                                "al r4 r4 LSL r0",
917                                "RdIsRn_al_r4_r4_LSL_r0",
918                                ARRAY_SIZE(kRdIsRn),
919                                kRdIsRn},
920                               {{al, r5, r5, LSL, r0},
921                                "al r5 r5 LSL r0",
922                                "RdIsRn_al_r5_r5_LSL_r0",
923                                ARRAY_SIZE(kRdIsRn),
924                                kRdIsRn},
925                               {{al, r6, r6, LSL, r0},
926                                "al r6 r6 LSL r0",
927                                "RdIsRn_al_r6_r6_LSL_r0",
928                                ARRAY_SIZE(kRdIsRn),
929                                kRdIsRn},
930                               {{al, r7, r7, LSL, r0},
931                                "al r7 r7 LSL r0",
932                                "RdIsRn_al_r7_r7_LSL_r0",
933                                ARRAY_SIZE(kRdIsRn),
934                                kRdIsRn},
935                               {{al, r8, r8, LSL, r0},
936                                "al r8 r8 LSL r0",
937                                "RdIsRn_al_r8_r8_LSL_r0",
938                                ARRAY_SIZE(kRdIsRn),
939                                kRdIsRn},
940                               {{al, r9, r9, LSL, r0},
941                                "al r9 r9 LSL r0",
942                                "RdIsRn_al_r9_r9_LSL_r0",
943                                ARRAY_SIZE(kRdIsRn),
944                                kRdIsRn},
945                               {{al, r10, r10, LSL, r0},
946                                "al r10 r10 LSL r0",
947                                "RdIsRn_al_r10_r10_LSL_r0",
948                                ARRAY_SIZE(kRdIsRn),
949                                kRdIsRn},
950                               {{al, r11, r11, LSL, r0},
951                                "al r11 r11 LSL r0",
952                                "RdIsRn_al_r11_r11_LSL_r0",
953                                ARRAY_SIZE(kRdIsRn),
954                                kRdIsRn},
955                               {{al, r12, r12, LSL, r0},
956                                "al r12 r12 LSL r0",
957                                "RdIsRn_al_r12_r12_LSL_r0",
958                                ARRAY_SIZE(kRdIsRn),
959                                kRdIsRn},
960                               {{al, r14, r14, LSL, r0},
961                                "al r14 r14 LSL r0",
962                                "RdIsRn_al_r14_r14_LSL_r0",
963                                ARRAY_SIZE(kRdIsRn),
964                                kRdIsRn},
965                               {{al, r1, r8, LSL, r0},
966                                "al r1 r8 LSL r0",
967                                "RdIsNotRn_al_r1_r8_LSL_r0",
968                                ARRAY_SIZE(kRdIsNotRn),
969                                kRdIsNotRn},
970                               {{al, r7, r4, LSL, r0},
971                                "al r7 r4 LSL r0",
972                                "RdIsNotRn_al_r7_r4_LSL_r0",
973                                ARRAY_SIZE(kRdIsNotRn),
974                                kRdIsNotRn},
975                               {{al, r14, r10, LSL, r0},
976                                "al r14 r10 LSL r0",
977                                "RdIsNotRn_al_r14_r10_LSL_r0",
978                                ARRAY_SIZE(kRdIsNotRn),
979                                kRdIsNotRn},
980                               {{al, r10, r6, LSL, r0},
981                                "al r10 r6 LSL r0",
982                                "RdIsNotRn_al_r10_r6_LSL_r0",
983                                ARRAY_SIZE(kRdIsNotRn),
984                                kRdIsNotRn},
985                               {{al, r6, r5, LSL, r0},
986                                "al r6 r5 LSL r0",
987                                "RdIsNotRn_al_r6_r5_LSL_r0",
988                                ARRAY_SIZE(kRdIsNotRn),
989                                kRdIsNotRn},
990                               {{al, r12, r2, LSL, r0},
991                                "al r12 r2 LSL r0",
992                                "RdIsNotRn_al_r12_r2_LSL_r0",
993                                ARRAY_SIZE(kRdIsNotRn),
994                                kRdIsNotRn},
995                               {{al, r0, r11, LSL, r0},
996                                "al r0 r11 LSL r0",
997                                "RdIsNotRn_al_r0_r11_LSL_r0",
998                                ARRAY_SIZE(kRdIsNotRn),
999                                kRdIsNotRn},
1000                               {{al, r10, r14, LSL, r0},
1001                                "al r10 r14 LSL r0",
1002                                "RdIsNotRn_al_r10_r14_LSL_r0",
1003                                ARRAY_SIZE(kRdIsNotRn),
1004                                kRdIsNotRn},
1005                               {{al, r0, r5, LSL, r0},
1006                                "al r0 r5 LSL r0",
1007                                "RdIsNotRn_al_r0_r5_LSL_r0",
1008                                ARRAY_SIZE(kRdIsNotRn),
1009                                kRdIsNotRn},
1010                               {{al, r0, r3, LSL, r0},
1011                                "al r0 r3 LSL r0",
1012                                "RdIsNotRn_al_r0_r3_LSL_r0",
1013                                ARRAY_SIZE(kRdIsNotRn),
1014                                kRdIsNotRn},
1015                               {{al, r0, r1, LSL, r2},
1016                                "al r0 r1 LSL r2",
1017                                "ShiftTypes_al_r0_r1_LSL_r2",
1018                                ARRAY_SIZE(kShiftTypes),
1019                                kShiftTypes},
1020                               {{al, r0, r1, LSR, r2},
1021                                "al r0 r1 LSR r2",
1022                                "ShiftTypes_al_r0_r1_LSR_r2",
1023                                ARRAY_SIZE(kShiftTypes),
1024                                kShiftTypes},
1025                               {{al, r0, r1, ASR, r2},
1026                                "al r0 r1 ASR r2",
1027                                "ShiftTypes_al_r0_r1_ASR_r2",
1028                                ARRAY_SIZE(kShiftTypes),
1029                                kShiftTypes},
1030                               {{al, r0, r1, ROR, r2},
1031                                "al r0 r1 ROR r2",
1032                                "ShiftTypes_al_r0_r1_ROR_r2",
1033                                ARRAY_SIZE(kShiftTypes),
1034                                kShiftTypes}};
1035
1036// We record all inputs to the instructions as outputs. This way, we also check
1037// that what shouldn't change didn't change.
1038struct TestResult {
1039  size_t output_size;
1040  const Inputs* outputs;
1041};
1042
1043// These headers each contain an array of `TestResult` with the reference output
1044// values. The reference arrays are names `kReference{mnemonic}`.
1045#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-cmn-a32.h"
1046#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-cmp-a32.h"
1047#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-mov-a32.h"
1048#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-movs-a32.h"
1049#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-mvn-a32.h"
1050#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-mvns-a32.h"
1051#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-teq-a32.h"
1052#include "aarch32/traces/simulator-cond-rd-operand-rn-shift-rs-tst-a32.h"
1053
1054
1055// The maximum number of errors to report in detail for each test.
1056const unsigned kErrorReportLimit = 8;
1057
1058typedef void (MacroAssembler::*Fn)(Condition cond,
1059                                   Register rd,
1060                                   const Operand& op);
1061
1062void TestHelper(Fn instruction,
1063                const char* mnemonic,
1064                const TestResult reference[]) {
1065  SETUP();
1066  masm.UseA32();
1067  START();
1068
1069  // Data to compare to `reference`.
1070  TestResult* results[ARRAY_SIZE(kTests)];
1071
1072  // Test cases for memory bound instructions may allocate a buffer and save its
1073  // address in this array.
1074  byte* scratch_memory_buffers[ARRAY_SIZE(kTests)];
1075
1076  // Generate a loop for each element in `kTests`. Each loop tests one specific
1077  // instruction.
1078  for (unsigned i = 0; i < ARRAY_SIZE(kTests); i++) {
1079    // Allocate results on the heap for this test.
1080    results[i] = new TestResult;
1081    results[i]->outputs = new Inputs[kTests[i].input_size];
1082    results[i]->output_size = kTests[i].input_size;
1083
1084    size_t input_stride = sizeof(kTests[i].inputs[0]) * kTests[i].input_size;
1085    VIXL_ASSERT(IsUint32(input_stride));
1086
1087    scratch_memory_buffers[i] = NULL;
1088
1089    Label loop;
1090    UseScratchRegisterScope scratch_registers(&masm);
1091    // Include all registers from r0 ro r12.
1092    scratch_registers.Include(RegisterList(0x1fff));
1093
1094    // Values to pass to the macro-assembler.
1095    Condition cond = kTests[i].operands.cond;
1096    Register rd = kTests[i].operands.rd;
1097    Register rn = kTests[i].operands.rn;
1098    ShiftType shift = kTests[i].operands.shift;
1099    Register rs = kTests[i].operands.rs;
1100    Operand op(rn, shift, rs);
1101    scratch_registers.Exclude(rd);
1102    scratch_registers.Exclude(rn);
1103    scratch_registers.Exclude(rs);
1104
1105    // Allocate reserved registers for our own use.
1106    Register input_ptr = scratch_registers.Acquire();
1107    Register input_end = scratch_registers.Acquire();
1108    Register result_ptr = scratch_registers.Acquire();
1109
1110    // Initialize `input_ptr` to the first element and `input_end` the address
1111    // after the array.
1112    __ Mov(input_ptr, Operand::From(kTests[i].inputs));
1113    __ Add(input_end, input_ptr, static_cast<uint32_t>(input_stride));
1114    __ Mov(result_ptr, Operand::From(results[i]->outputs));
1115    __ Bind(&loop);
1116
1117    {
1118      UseScratchRegisterScope temp_registers(&masm);
1119      Register nzcv_bits = temp_registers.Acquire();
1120      Register saved_q_bit = temp_registers.Acquire();
1121      // Save the `Q` bit flag.
1122      __ Mrs(saved_q_bit, APSR);
1123      __ And(saved_q_bit, saved_q_bit, QFlag);
1124      // Set the `NZCV` and `Q` flags together.
1125      __ Ldr(nzcv_bits, MemOperand(input_ptr, offsetof(Inputs, apsr)));
1126      __ Orr(nzcv_bits, nzcv_bits, saved_q_bit);
1127      __ Msr(APSR_nzcvq, nzcv_bits);
1128    }
1129    __ Ldr(rd, MemOperand(input_ptr, offsetof(Inputs, rd)));
1130    __ Ldr(rn, MemOperand(input_ptr, offsetof(Inputs, rn)));
1131    __ Ldr(rs, MemOperand(input_ptr, offsetof(Inputs, rs)));
1132
1133    (masm.*instruction)(cond, rd, op);
1134
1135    {
1136      UseScratchRegisterScope temp_registers(&masm);
1137      Register nzcv_bits = temp_registers.Acquire();
1138      __ Mrs(nzcv_bits, APSR);
1139      // Only record the NZCV bits.
1140      __ And(nzcv_bits, nzcv_bits, NZCVFlag);
1141      __ Str(nzcv_bits, MemOperand(result_ptr, offsetof(Inputs, apsr)));
1142    }
1143    __ Str(rd, MemOperand(result_ptr, offsetof(Inputs, rd)));
1144    __ Str(rn, MemOperand(result_ptr, offsetof(Inputs, rn)));
1145    __ Str(rs, MemOperand(result_ptr, offsetof(Inputs, rs)));
1146
1147    // Advance the result pointer.
1148    __ Add(result_ptr, result_ptr, Operand::From(sizeof(kTests[i].inputs[0])));
1149    // Loop back until `input_ptr` is lower than `input_base`.
1150    __ Add(input_ptr, input_ptr, Operand::From(sizeof(kTests[i].inputs[0])));
1151    __ Cmp(input_ptr, input_end);
1152    __ B(ne, &loop);
1153  }
1154
1155  END();
1156
1157  RUN();
1158
1159  if (Test::generate_test_trace()) {
1160    // Print the results.
1161    for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1162      printf("const Inputs kOutputs_%s_%s[] = {\n",
1163             mnemonic,
1164             kTests[i].identifier);
1165      for (size_t j = 0; j < results[i]->output_size; j++) {
1166        printf("  { ");
1167        printf("0x%08" PRIx32, results[i]->outputs[j].apsr);
1168        printf(", ");
1169        printf("0x%08" PRIx32, results[i]->outputs[j].rd);
1170        printf(", ");
1171        printf("0x%08" PRIx32, results[i]->outputs[j].rn);
1172        printf(", ");
1173        printf("0x%08" PRIx32, results[i]->outputs[j].rs);
1174        printf(" },\n");
1175      }
1176      printf("};\n");
1177    }
1178    printf("const TestResult kReference%s[] = {\n", mnemonic);
1179    for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1180      printf("  {\n");
1181      printf("    ARRAY_SIZE(kOutputs_%s_%s),\n",
1182             mnemonic,
1183             kTests[i].identifier);
1184      printf("    kOutputs_%s_%s,\n", mnemonic, kTests[i].identifier);
1185      printf("  },\n");
1186    }
1187    printf("};\n");
1188  } else if (kCheckSimulatorTestResults) {
1189    // Check the results.
1190    unsigned total_error_count = 0;
1191    for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1192      bool instruction_has_errors = false;
1193      for (size_t j = 0; j < kTests[i].input_size; j++) {
1194        uint32_t apsr = results[i]->outputs[j].apsr;
1195        uint32_t rd = results[i]->outputs[j].rd;
1196        uint32_t rn = results[i]->outputs[j].rn;
1197        uint32_t rs = results[i]->outputs[j].rs;
1198        uint32_t apsr_input = kTests[i].inputs[j].apsr;
1199        uint32_t rd_input = kTests[i].inputs[j].rd;
1200        uint32_t rn_input = kTests[i].inputs[j].rn;
1201        uint32_t rs_input = kTests[i].inputs[j].rs;
1202        uint32_t apsr_ref = reference[i].outputs[j].apsr;
1203        uint32_t rd_ref = reference[i].outputs[j].rd;
1204        uint32_t rn_ref = reference[i].outputs[j].rn;
1205        uint32_t rs_ref = reference[i].outputs[j].rs;
1206
1207        if (((apsr != apsr_ref) || (rd != rd_ref) || (rn != rn_ref) ||
1208             (rs != rs_ref)) &&
1209            (++total_error_count <= kErrorReportLimit)) {
1210          // Print the instruction once even if it triggered multiple failures.
1211          if (!instruction_has_errors) {
1212            printf("Error(s) when testing \"%s %s\":\n",
1213                   mnemonic,
1214                   kTests[i].operands_description);
1215            instruction_has_errors = true;
1216          }
1217          // Print subsequent errors.
1218          printf("  Input:    ");
1219          printf("0x%08" PRIx32, apsr_input);
1220          printf(", ");
1221          printf("0x%08" PRIx32, rd_input);
1222          printf(", ");
1223          printf("0x%08" PRIx32, rn_input);
1224          printf(", ");
1225          printf("0x%08" PRIx32, rs_input);
1226          printf("\n");
1227          printf("  Expected: ");
1228          printf("0x%08" PRIx32, apsr_ref);
1229          printf(", ");
1230          printf("0x%08" PRIx32, rd_ref);
1231          printf(", ");
1232          printf("0x%08" PRIx32, rn_ref);
1233          printf(", ");
1234          printf("0x%08" PRIx32, rs_ref);
1235          printf("\n");
1236          printf("  Found:    ");
1237          printf("0x%08" PRIx32, apsr);
1238          printf(", ");
1239          printf("0x%08" PRIx32, rd);
1240          printf(", ");
1241          printf("0x%08" PRIx32, rn);
1242          printf(", ");
1243          printf("0x%08" PRIx32, rs);
1244          printf("\n\n");
1245        }
1246      }
1247    }
1248
1249    if (total_error_count > kErrorReportLimit) {
1250      printf("%u other errors follow.\n",
1251             total_error_count - kErrorReportLimit);
1252    }
1253    VIXL_CHECK(total_error_count == 0);
1254  } else {
1255    VIXL_WARNING("Assembled the code, but did not run anything.\n");
1256  }
1257
1258  for (size_t i = 0; i < ARRAY_SIZE(kTests); i++) {
1259    delete[] results[i]->outputs;
1260    delete results[i];
1261    delete[] scratch_memory_buffers[i];
1262  }
1263}
1264
1265// Instantiate tests for each instruction in the list.
1266// TODO: Remove this limitation by having a sandboxing mechanism.
1267#if defined(VIXL_HOST_POINTER_32)
1268#define TEST(mnemonic)                                                      \
1269  void Test_##mnemonic() {                                                  \
1270    TestHelper(&MacroAssembler::mnemonic, #mnemonic, kReference##mnemonic); \
1271  }                                                                         \
1272  Test test_##mnemonic(                                                     \
1273      "AARCH32_SIMULATOR_COND_RD_OPERAND_RN_SHIFT_RS_" #mnemonic "_A32",    \
1274      &Test_##mnemonic);
1275#else
1276#define TEST(mnemonic)                                                   \
1277  void Test_##mnemonic() {                                               \
1278    VIXL_WARNING("This test can only run on a 32-bit host.\n");          \
1279    USE(TestHelper);                                                     \
1280  }                                                                      \
1281  Test test_##mnemonic(                                                  \
1282      "AARCH32_SIMULATOR_COND_RD_OPERAND_RN_SHIFT_RS_" #mnemonic "_A32", \
1283      &Test_##mnemonic);
1284#endif
1285
1286FOREACH_INSTRUCTION(TEST)
1287#undef TEST
1288
1289}  // namespace
1290#endif
1291
1292}  // namespace aarch32
1293}  // namespace vixl
1294