xref: /minix3/sys/external/bsd/compiler_rt/dist/test/Unit/ctzsi2_test.c (revision 4684ddb6aab0b36791c8099bc705d6140b3d05d0)
1*4684ddb6SLionel Sambuc //===-- ctzsi2_test.c - Test __ctzsi2 -------------------------------------===//
2*4684ddb6SLionel Sambuc //
3*4684ddb6SLionel Sambuc //                     The LLVM Compiler Infrastructure
4*4684ddb6SLionel Sambuc //
5*4684ddb6SLionel Sambuc // This file is dual licensed under the MIT and the University of Illinois Open
6*4684ddb6SLionel Sambuc // Source Licenses. See LICENSE.TXT for details.
7*4684ddb6SLionel Sambuc //
8*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
9*4684ddb6SLionel Sambuc //
10*4684ddb6SLionel Sambuc // This file tests __ctzsi2 for the compiler_rt library.
11*4684ddb6SLionel Sambuc //
12*4684ddb6SLionel Sambuc //===----------------------------------------------------------------------===//
13*4684ddb6SLionel Sambuc 
14*4684ddb6SLionel Sambuc #include "int_lib.h"
15*4684ddb6SLionel Sambuc #include <stdio.h>
16*4684ddb6SLionel Sambuc 
17*4684ddb6SLionel Sambuc // Returns: the number of trailing 0-bits
18*4684ddb6SLionel Sambuc 
19*4684ddb6SLionel Sambuc // Precondition: a != 0
20*4684ddb6SLionel Sambuc 
21*4684ddb6SLionel Sambuc si_int __ctzsi2(si_int a);
22*4684ddb6SLionel Sambuc 
test__ctzsi2(si_int a,si_int expected)23*4684ddb6SLionel Sambuc int test__ctzsi2(si_int a, si_int expected)
24*4684ddb6SLionel Sambuc {
25*4684ddb6SLionel Sambuc     si_int x = __ctzsi2(a);
26*4684ddb6SLionel Sambuc     if (x != expected)
27*4684ddb6SLionel Sambuc         printf("error in __ctzsi2(0x%X) = %d, expected %d\n", a, x, expected);
28*4684ddb6SLionel Sambuc     return x != expected;
29*4684ddb6SLionel Sambuc }
30*4684ddb6SLionel Sambuc 
31*4684ddb6SLionel Sambuc char assumption_1[sizeof(di_int) == 2*sizeof(si_int)] = {0};
32*4684ddb6SLionel Sambuc char assumption_2[sizeof(si_int)*CHAR_BIT == 32] = {0};
33*4684ddb6SLionel Sambuc 
main()34*4684ddb6SLionel Sambuc int main()
35*4684ddb6SLionel Sambuc {
36*4684ddb6SLionel Sambuc //     if (test__ctzsi2(0x00000000, 32))  // undefined
37*4684ddb6SLionel Sambuc //         return 1;
38*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000001, 0))
39*4684ddb6SLionel Sambuc         return 1;
40*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000002, 1))
41*4684ddb6SLionel Sambuc         return 1;
42*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000003, 0))
43*4684ddb6SLionel Sambuc         return 1;
44*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000004, 2))
45*4684ddb6SLionel Sambuc         return 1;
46*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000005, 0))
47*4684ddb6SLionel Sambuc         return 1;
48*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000006, 1))
49*4684ddb6SLionel Sambuc         return 1;
50*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000007, 0))
51*4684ddb6SLionel Sambuc         return 1;
52*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000008, 3))
53*4684ddb6SLionel Sambuc         return 1;
54*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000009, 0))
55*4684ddb6SLionel Sambuc         return 1;
56*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000A, 1))
57*4684ddb6SLionel Sambuc         return 1;
58*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000B, 0))
59*4684ddb6SLionel Sambuc         return 1;
60*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000C, 2))
61*4684ddb6SLionel Sambuc         return 1;
62*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000D, 0))
63*4684ddb6SLionel Sambuc         return 1;
64*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000E, 1))
65*4684ddb6SLionel Sambuc         return 1;
66*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000000F, 0))
67*4684ddb6SLionel Sambuc         return 1;
68*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000010, 4))
69*4684ddb6SLionel Sambuc         return 1;
70*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000012, 1))
71*4684ddb6SLionel Sambuc         return 1;
72*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000013, 0))
73*4684ddb6SLionel Sambuc         return 1;
74*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000014, 2))
75*4684ddb6SLionel Sambuc         return 1;
76*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000015, 0))
77*4684ddb6SLionel Sambuc         return 1;
78*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000016, 1))
79*4684ddb6SLionel Sambuc         return 1;
80*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000017, 0))
81*4684ddb6SLionel Sambuc         return 1;
82*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000018, 3))
83*4684ddb6SLionel Sambuc         return 1;
84*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000019, 0))
85*4684ddb6SLionel Sambuc         return 1;
86*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001A, 1))
87*4684ddb6SLionel Sambuc         return 1;
88*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001B, 0))
89*4684ddb6SLionel Sambuc         return 1;
90*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001C, 2))
91*4684ddb6SLionel Sambuc         return 1;
92*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001D, 0))
93*4684ddb6SLionel Sambuc         return 1;
94*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001E, 1))
95*4684ddb6SLionel Sambuc         return 1;
96*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000001F, 0))
97*4684ddb6SLionel Sambuc         return 1;
98*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000020, 5))
99*4684ddb6SLionel Sambuc         return 1;
100*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000022, 1))
101*4684ddb6SLionel Sambuc         return 1;
102*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000023, 0))
103*4684ddb6SLionel Sambuc         return 1;
104*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000024, 2))
105*4684ddb6SLionel Sambuc         return 1;
106*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000025, 0))
107*4684ddb6SLionel Sambuc         return 1;
108*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000026, 1))
109*4684ddb6SLionel Sambuc         return 1;
110*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000027, 0))
111*4684ddb6SLionel Sambuc         return 1;
112*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000028, 3))
113*4684ddb6SLionel Sambuc         return 1;
114*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000029, 0))
115*4684ddb6SLionel Sambuc         return 1;
116*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002A, 1))
117*4684ddb6SLionel Sambuc         return 1;
118*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002B, 0))
119*4684ddb6SLionel Sambuc         return 1;
120*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002C, 2))
121*4684ddb6SLionel Sambuc         return 1;
122*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002D, 0))
123*4684ddb6SLionel Sambuc         return 1;
124*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002E, 1))
125*4684ddb6SLionel Sambuc         return 1;
126*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000002F, 0))
127*4684ddb6SLionel Sambuc         return 1;
128*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000030, 4))
129*4684ddb6SLionel Sambuc         return 1;
130*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000032, 1))
131*4684ddb6SLionel Sambuc         return 1;
132*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000033, 0))
133*4684ddb6SLionel Sambuc         return 1;
134*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000034, 2))
135*4684ddb6SLionel Sambuc         return 1;
136*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000035, 0))
137*4684ddb6SLionel Sambuc         return 1;
138*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000036, 1))
139*4684ddb6SLionel Sambuc         return 1;
140*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000037, 0))
141*4684ddb6SLionel Sambuc         return 1;
142*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000038, 3))
143*4684ddb6SLionel Sambuc         return 1;
144*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000039, 0))
145*4684ddb6SLionel Sambuc         return 1;
146*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003A, 1))
147*4684ddb6SLionel Sambuc         return 1;
148*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003B, 0))
149*4684ddb6SLionel Sambuc         return 1;
150*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003C, 2))
151*4684ddb6SLionel Sambuc         return 1;
152*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003D, 0))
153*4684ddb6SLionel Sambuc         return 1;
154*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003E, 1))
155*4684ddb6SLionel Sambuc         return 1;
156*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000003F, 0))
157*4684ddb6SLionel Sambuc         return 1;
158*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000040, 6))
159*4684ddb6SLionel Sambuc         return 1;
160*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000042, 1))
161*4684ddb6SLionel Sambuc         return 1;
162*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000043, 0))
163*4684ddb6SLionel Sambuc         return 1;
164*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000044, 2))
165*4684ddb6SLionel Sambuc         return 1;
166*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000045, 0))
167*4684ddb6SLionel Sambuc         return 1;
168*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000046, 1))
169*4684ddb6SLionel Sambuc         return 1;
170*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000047, 0))
171*4684ddb6SLionel Sambuc         return 1;
172*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000048, 3))
173*4684ddb6SLionel Sambuc         return 1;
174*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000049, 0))
175*4684ddb6SLionel Sambuc         return 1;
176*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004A, 1))
177*4684ddb6SLionel Sambuc         return 1;
178*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004B, 0))
179*4684ddb6SLionel Sambuc         return 1;
180*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004C, 2))
181*4684ddb6SLionel Sambuc         return 1;
182*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004D, 0))
183*4684ddb6SLionel Sambuc         return 1;
184*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004E, 1))
185*4684ddb6SLionel Sambuc         return 1;
186*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000004F, 0))
187*4684ddb6SLionel Sambuc         return 1;
188*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000050, 4))
189*4684ddb6SLionel Sambuc         return 1;
190*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000052, 1))
191*4684ddb6SLionel Sambuc         return 1;
192*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000053, 0))
193*4684ddb6SLionel Sambuc         return 1;
194*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000054, 2))
195*4684ddb6SLionel Sambuc         return 1;
196*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000055, 0))
197*4684ddb6SLionel Sambuc         return 1;
198*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000056, 1))
199*4684ddb6SLionel Sambuc         return 1;
200*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000057, 0))
201*4684ddb6SLionel Sambuc         return 1;
202*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000058, 3))
203*4684ddb6SLionel Sambuc         return 1;
204*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000059, 0))
205*4684ddb6SLionel Sambuc         return 1;
206*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005A, 1))
207*4684ddb6SLionel Sambuc         return 1;
208*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005B, 0))
209*4684ddb6SLionel Sambuc         return 1;
210*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005C, 2))
211*4684ddb6SLionel Sambuc         return 1;
212*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005D, 0))
213*4684ddb6SLionel Sambuc         return 1;
214*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005E, 1))
215*4684ddb6SLionel Sambuc         return 1;
216*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000005F, 0))
217*4684ddb6SLionel Sambuc         return 1;
218*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000060, 5))
219*4684ddb6SLionel Sambuc         return 1;
220*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000062, 1))
221*4684ddb6SLionel Sambuc         return 1;
222*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000063, 0))
223*4684ddb6SLionel Sambuc         return 1;
224*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000064, 2))
225*4684ddb6SLionel Sambuc         return 1;
226*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000065, 0))
227*4684ddb6SLionel Sambuc         return 1;
228*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000066, 1))
229*4684ddb6SLionel Sambuc         return 1;
230*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000067, 0))
231*4684ddb6SLionel Sambuc         return 1;
232*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000068, 3))
233*4684ddb6SLionel Sambuc         return 1;
234*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000069, 0))
235*4684ddb6SLionel Sambuc         return 1;
236*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006A, 1))
237*4684ddb6SLionel Sambuc         return 1;
238*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006B, 0))
239*4684ddb6SLionel Sambuc         return 1;
240*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006C, 2))
241*4684ddb6SLionel Sambuc         return 1;
242*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006D, 0))
243*4684ddb6SLionel Sambuc         return 1;
244*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006E, 1))
245*4684ddb6SLionel Sambuc         return 1;
246*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000006F, 0))
247*4684ddb6SLionel Sambuc         return 1;
248*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000070, 4))
249*4684ddb6SLionel Sambuc         return 1;
250*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000072, 1))
251*4684ddb6SLionel Sambuc         return 1;
252*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000073, 0))
253*4684ddb6SLionel Sambuc         return 1;
254*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000074, 2))
255*4684ddb6SLionel Sambuc         return 1;
256*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000075, 0))
257*4684ddb6SLionel Sambuc         return 1;
258*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000076, 1))
259*4684ddb6SLionel Sambuc         return 1;
260*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000077, 0))
261*4684ddb6SLionel Sambuc         return 1;
262*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000078, 3))
263*4684ddb6SLionel Sambuc         return 1;
264*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000079, 0))
265*4684ddb6SLionel Sambuc         return 1;
266*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007A, 1))
267*4684ddb6SLionel Sambuc         return 1;
268*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007B, 0))
269*4684ddb6SLionel Sambuc         return 1;
270*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007C, 2))
271*4684ddb6SLionel Sambuc         return 1;
272*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007D, 0))
273*4684ddb6SLionel Sambuc         return 1;
274*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007E, 1))
275*4684ddb6SLionel Sambuc         return 1;
276*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000007F, 0))
277*4684ddb6SLionel Sambuc         return 1;
278*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000080, 7))
279*4684ddb6SLionel Sambuc         return 1;
280*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000082, 1))
281*4684ddb6SLionel Sambuc         return 1;
282*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000083, 0))
283*4684ddb6SLionel Sambuc         return 1;
284*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000084, 2))
285*4684ddb6SLionel Sambuc         return 1;
286*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000085, 0))
287*4684ddb6SLionel Sambuc         return 1;
288*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000086, 1))
289*4684ddb6SLionel Sambuc         return 1;
290*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000087, 0))
291*4684ddb6SLionel Sambuc         return 1;
292*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000088, 3))
293*4684ddb6SLionel Sambuc         return 1;
294*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000089, 0))
295*4684ddb6SLionel Sambuc         return 1;
296*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008A, 1))
297*4684ddb6SLionel Sambuc         return 1;
298*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008B, 0))
299*4684ddb6SLionel Sambuc         return 1;
300*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008C, 2))
301*4684ddb6SLionel Sambuc         return 1;
302*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008D, 0))
303*4684ddb6SLionel Sambuc         return 1;
304*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008E, 1))
305*4684ddb6SLionel Sambuc         return 1;
306*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000008F, 0))
307*4684ddb6SLionel Sambuc         return 1;
308*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000090, 4))
309*4684ddb6SLionel Sambuc         return 1;
310*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000092, 1))
311*4684ddb6SLionel Sambuc         return 1;
312*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000093, 0))
313*4684ddb6SLionel Sambuc         return 1;
314*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000094, 2))
315*4684ddb6SLionel Sambuc         return 1;
316*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000095, 0))
317*4684ddb6SLionel Sambuc         return 1;
318*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000096, 1))
319*4684ddb6SLionel Sambuc         return 1;
320*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000097, 0))
321*4684ddb6SLionel Sambuc         return 1;
322*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000098, 3))
323*4684ddb6SLionel Sambuc         return 1;
324*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000099, 0))
325*4684ddb6SLionel Sambuc         return 1;
326*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009A, 1))
327*4684ddb6SLionel Sambuc         return 1;
328*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009B, 0))
329*4684ddb6SLionel Sambuc         return 1;
330*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009C, 2))
331*4684ddb6SLionel Sambuc         return 1;
332*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009D, 0))
333*4684ddb6SLionel Sambuc         return 1;
334*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009E, 1))
335*4684ddb6SLionel Sambuc         return 1;
336*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x0000009F, 0))
337*4684ddb6SLionel Sambuc         return 1;
338*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A0, 5))
339*4684ddb6SLionel Sambuc         return 1;
340*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A2, 1))
341*4684ddb6SLionel Sambuc         return 1;
342*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A3, 0))
343*4684ddb6SLionel Sambuc         return 1;
344*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A4, 2))
345*4684ddb6SLionel Sambuc         return 1;
346*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A5, 0))
347*4684ddb6SLionel Sambuc         return 1;
348*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A6, 1))
349*4684ddb6SLionel Sambuc         return 1;
350*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A7, 0))
351*4684ddb6SLionel Sambuc         return 1;
352*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A8, 3))
353*4684ddb6SLionel Sambuc         return 1;
354*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000A9, 0))
355*4684ddb6SLionel Sambuc         return 1;
356*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AA, 1))
357*4684ddb6SLionel Sambuc         return 1;
358*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AB, 0))
359*4684ddb6SLionel Sambuc         return 1;
360*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AC, 2))
361*4684ddb6SLionel Sambuc         return 1;
362*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AD, 0))
363*4684ddb6SLionel Sambuc         return 1;
364*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AE, 1))
365*4684ddb6SLionel Sambuc         return 1;
366*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000AF, 0))
367*4684ddb6SLionel Sambuc         return 1;
368*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B0, 4))
369*4684ddb6SLionel Sambuc         return 1;
370*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B2, 1))
371*4684ddb6SLionel Sambuc         return 1;
372*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B3, 0))
373*4684ddb6SLionel Sambuc         return 1;
374*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B4, 2))
375*4684ddb6SLionel Sambuc         return 1;
376*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B5, 0))
377*4684ddb6SLionel Sambuc         return 1;
378*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B6, 1))
379*4684ddb6SLionel Sambuc         return 1;
380*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B7, 0))
381*4684ddb6SLionel Sambuc         return 1;
382*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B8, 3))
383*4684ddb6SLionel Sambuc         return 1;
384*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000B9, 0))
385*4684ddb6SLionel Sambuc         return 1;
386*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BA, 1))
387*4684ddb6SLionel Sambuc         return 1;
388*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BB, 0))
389*4684ddb6SLionel Sambuc         return 1;
390*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BC, 2))
391*4684ddb6SLionel Sambuc         return 1;
392*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BD, 0))
393*4684ddb6SLionel Sambuc         return 1;
394*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BE, 1))
395*4684ddb6SLionel Sambuc         return 1;
396*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000BF, 0))
397*4684ddb6SLionel Sambuc         return 1;
398*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C0, 6))
399*4684ddb6SLionel Sambuc         return 1;
400*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C2, 1))
401*4684ddb6SLionel Sambuc         return 1;
402*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C3, 0))
403*4684ddb6SLionel Sambuc         return 1;
404*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C4, 2))
405*4684ddb6SLionel Sambuc         return 1;
406*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C5, 0))
407*4684ddb6SLionel Sambuc         return 1;
408*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C6, 1))
409*4684ddb6SLionel Sambuc         return 1;
410*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C7, 0))
411*4684ddb6SLionel Sambuc         return 1;
412*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C8, 3))
413*4684ddb6SLionel Sambuc         return 1;
414*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000C9, 0))
415*4684ddb6SLionel Sambuc         return 1;
416*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CA, 1))
417*4684ddb6SLionel Sambuc         return 1;
418*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CB, 0))
419*4684ddb6SLionel Sambuc         return 1;
420*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CC, 2))
421*4684ddb6SLionel Sambuc         return 1;
422*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CD, 0))
423*4684ddb6SLionel Sambuc         return 1;
424*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CE, 1))
425*4684ddb6SLionel Sambuc         return 1;
426*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000CF, 0))
427*4684ddb6SLionel Sambuc         return 1;
428*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D0, 4))
429*4684ddb6SLionel Sambuc         return 1;
430*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D2, 1))
431*4684ddb6SLionel Sambuc         return 1;
432*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D3, 0))
433*4684ddb6SLionel Sambuc         return 1;
434*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D4, 2))
435*4684ddb6SLionel Sambuc         return 1;
436*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D5, 0))
437*4684ddb6SLionel Sambuc         return 1;
438*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D6, 1))
439*4684ddb6SLionel Sambuc         return 1;
440*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D7, 0))
441*4684ddb6SLionel Sambuc         return 1;
442*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D8, 3))
443*4684ddb6SLionel Sambuc         return 1;
444*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000D9, 0))
445*4684ddb6SLionel Sambuc         return 1;
446*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DA, 1))
447*4684ddb6SLionel Sambuc         return 1;
448*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DB, 0))
449*4684ddb6SLionel Sambuc         return 1;
450*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DC, 2))
451*4684ddb6SLionel Sambuc         return 1;
452*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DD, 0))
453*4684ddb6SLionel Sambuc         return 1;
454*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DE, 1))
455*4684ddb6SLionel Sambuc         return 1;
456*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000DF, 0))
457*4684ddb6SLionel Sambuc         return 1;
458*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E0, 5))
459*4684ddb6SLionel Sambuc         return 1;
460*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E2, 1))
461*4684ddb6SLionel Sambuc         return 1;
462*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E3, 0))
463*4684ddb6SLionel Sambuc         return 1;
464*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E4, 2))
465*4684ddb6SLionel Sambuc         return 1;
466*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E5, 0))
467*4684ddb6SLionel Sambuc         return 1;
468*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E6, 1))
469*4684ddb6SLionel Sambuc         return 1;
470*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E7, 0))
471*4684ddb6SLionel Sambuc         return 1;
472*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E8, 3))
473*4684ddb6SLionel Sambuc         return 1;
474*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000E9, 0))
475*4684ddb6SLionel Sambuc         return 1;
476*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000EA, 1))
477*4684ddb6SLionel Sambuc         return 1;
478*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000EB, 0))
479*4684ddb6SLionel Sambuc         return 1;
480*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000EC, 2))
481*4684ddb6SLionel Sambuc         return 1;
482*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000ED, 0))
483*4684ddb6SLionel Sambuc         return 1;
484*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000EE, 1))
485*4684ddb6SLionel Sambuc         return 1;
486*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000EF, 0))
487*4684ddb6SLionel Sambuc         return 1;
488*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F0, 4))
489*4684ddb6SLionel Sambuc         return 1;
490*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F2, 1))
491*4684ddb6SLionel Sambuc         return 1;
492*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F3, 0))
493*4684ddb6SLionel Sambuc         return 1;
494*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F4, 2))
495*4684ddb6SLionel Sambuc         return 1;
496*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F5, 0))
497*4684ddb6SLionel Sambuc         return 1;
498*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F6, 1))
499*4684ddb6SLionel Sambuc         return 1;
500*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F7, 0))
501*4684ddb6SLionel Sambuc         return 1;
502*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F8, 3))
503*4684ddb6SLionel Sambuc         return 1;
504*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000F9, 0))
505*4684ddb6SLionel Sambuc         return 1;
506*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FA, 1))
507*4684ddb6SLionel Sambuc         return 1;
508*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FB, 0))
509*4684ddb6SLionel Sambuc         return 1;
510*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FC, 2))
511*4684ddb6SLionel Sambuc         return 1;
512*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FD, 0))
513*4684ddb6SLionel Sambuc         return 1;
514*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FE, 1))
515*4684ddb6SLionel Sambuc         return 1;
516*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x000000FF, 0))
517*4684ddb6SLionel Sambuc         return 1;
518*4684ddb6SLionel Sambuc 
519*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000100, 8))
520*4684ddb6SLionel Sambuc         return 1;
521*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000200, 9))
522*4684ddb6SLionel Sambuc         return 1;
523*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000400, 10))
524*4684ddb6SLionel Sambuc         return 1;
525*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00000800, 11))
526*4684ddb6SLionel Sambuc         return 1;
527*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00001000, 12))
528*4684ddb6SLionel Sambuc         return 1;
529*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00002000, 13))
530*4684ddb6SLionel Sambuc         return 1;
531*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00004000, 14))
532*4684ddb6SLionel Sambuc         return 1;
533*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00008000, 15))
534*4684ddb6SLionel Sambuc         return 1;
535*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00010000, 16))
536*4684ddb6SLionel Sambuc         return 1;
537*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00020000, 17))
538*4684ddb6SLionel Sambuc         return 1;
539*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00040000, 18))
540*4684ddb6SLionel Sambuc         return 1;
541*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00080000, 19))
542*4684ddb6SLionel Sambuc         return 1;
543*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00100000, 20))
544*4684ddb6SLionel Sambuc         return 1;
545*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00200000, 21))
546*4684ddb6SLionel Sambuc         return 1;
547*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00400000, 22))
548*4684ddb6SLionel Sambuc         return 1;
549*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x00800000, 23))
550*4684ddb6SLionel Sambuc         return 1;
551*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x01000000, 24))
552*4684ddb6SLionel Sambuc         return 1;
553*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x02000000, 25))
554*4684ddb6SLionel Sambuc         return 1;
555*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x04000000, 26))
556*4684ddb6SLionel Sambuc         return 1;
557*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x08000000, 27))
558*4684ddb6SLionel Sambuc         return 1;
559*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x10000000, 28))
560*4684ddb6SLionel Sambuc         return 1;
561*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x20000000, 29))
562*4684ddb6SLionel Sambuc         return 1;
563*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x40000000, 30))
564*4684ddb6SLionel Sambuc         return 1;
565*4684ddb6SLionel Sambuc     if (test__ctzsi2(0x80000000, 31))
566*4684ddb6SLionel Sambuc         return 1;
567*4684ddb6SLionel Sambuc 
568*4684ddb6SLionel Sambuc    return 0;
569*4684ddb6SLionel Sambuc }
570