1*4684ddb6SLionel Sambuc //===-- clzsi2_test.c - Test __clzsi2 -------------------------------------===//
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 __clzsi2 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 leading 0-bits
18*4684ddb6SLionel Sambuc
19*4684ddb6SLionel Sambuc // Precondition: a != 0
20*4684ddb6SLionel Sambuc
21*4684ddb6SLionel Sambuc si_int __clzsi2(si_int a);
22*4684ddb6SLionel Sambuc
test__clzsi2(si_int a,si_int expected)23*4684ddb6SLionel Sambuc int test__clzsi2(si_int a, si_int expected)
24*4684ddb6SLionel Sambuc {
25*4684ddb6SLionel Sambuc si_int x = __clzsi2(a);
26*4684ddb6SLionel Sambuc if (x != expected)
27*4684ddb6SLionel Sambuc printf("error in __clzsi2(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__clzsi2(0x00000000, 32)) // undefined
37*4684ddb6SLionel Sambuc // return 1;
38*4684ddb6SLionel Sambuc if (test__clzsi2(0x00800000, 8))
39*4684ddb6SLionel Sambuc return 1;
40*4684ddb6SLionel Sambuc if (test__clzsi2(0x01000000, 7))
41*4684ddb6SLionel Sambuc return 1;
42*4684ddb6SLionel Sambuc if (test__clzsi2(0x02000000, 6))
43*4684ddb6SLionel Sambuc return 1;
44*4684ddb6SLionel Sambuc if (test__clzsi2(0x03000000, 6))
45*4684ddb6SLionel Sambuc return 1;
46*4684ddb6SLionel Sambuc if (test__clzsi2(0x04000000, 5))
47*4684ddb6SLionel Sambuc return 1;
48*4684ddb6SLionel Sambuc if (test__clzsi2(0x05000000, 5))
49*4684ddb6SLionel Sambuc return 1;
50*4684ddb6SLionel Sambuc if (test__clzsi2(0x06000000, 5))
51*4684ddb6SLionel Sambuc return 1;
52*4684ddb6SLionel Sambuc if (test__clzsi2(0x07000000, 5))
53*4684ddb6SLionel Sambuc return 1;
54*4684ddb6SLionel Sambuc if (test__clzsi2(0x08000000, 4))
55*4684ddb6SLionel Sambuc return 1;
56*4684ddb6SLionel Sambuc if (test__clzsi2(0x09000000, 4))
57*4684ddb6SLionel Sambuc return 1;
58*4684ddb6SLionel Sambuc if (test__clzsi2(0x0A000000, 4))
59*4684ddb6SLionel Sambuc return 1;
60*4684ddb6SLionel Sambuc if (test__clzsi2(0x0B000000, 4))
61*4684ddb6SLionel Sambuc return 1;
62*4684ddb6SLionel Sambuc if (test__clzsi2(0x0C000000, 4))
63*4684ddb6SLionel Sambuc return 1;
64*4684ddb6SLionel Sambuc if (test__clzsi2(0x0D000000, 4))
65*4684ddb6SLionel Sambuc return 1;
66*4684ddb6SLionel Sambuc if (test__clzsi2(0x0E000000, 4))
67*4684ddb6SLionel Sambuc return 1;
68*4684ddb6SLionel Sambuc if (test__clzsi2(0x0F000000, 4))
69*4684ddb6SLionel Sambuc return 1;
70*4684ddb6SLionel Sambuc if (test__clzsi2(0x10000000, 3))
71*4684ddb6SLionel Sambuc return 1;
72*4684ddb6SLionel Sambuc if (test__clzsi2(0x11000000, 3))
73*4684ddb6SLionel Sambuc return 1;
74*4684ddb6SLionel Sambuc if (test__clzsi2(0x12000000, 3))
75*4684ddb6SLionel Sambuc return 1;
76*4684ddb6SLionel Sambuc if (test__clzsi2(0x13000000, 3))
77*4684ddb6SLionel Sambuc return 1;
78*4684ddb6SLionel Sambuc if (test__clzsi2(0x14000000, 3))
79*4684ddb6SLionel Sambuc return 1;
80*4684ddb6SLionel Sambuc if (test__clzsi2(0x15000000, 3))
81*4684ddb6SLionel Sambuc return 1;
82*4684ddb6SLionel Sambuc if (test__clzsi2(0x16000000, 3))
83*4684ddb6SLionel Sambuc return 1;
84*4684ddb6SLionel Sambuc if (test__clzsi2(0x17000000, 3))
85*4684ddb6SLionel Sambuc return 1;
86*4684ddb6SLionel Sambuc if (test__clzsi2(0x18000000, 3))
87*4684ddb6SLionel Sambuc return 1;
88*4684ddb6SLionel Sambuc if (test__clzsi2(0x19000000, 3))
89*4684ddb6SLionel Sambuc return 1;
90*4684ddb6SLionel Sambuc if (test__clzsi2(0x1A000000, 3))
91*4684ddb6SLionel Sambuc return 1;
92*4684ddb6SLionel Sambuc if (test__clzsi2(0x1B000000, 3))
93*4684ddb6SLionel Sambuc return 1;
94*4684ddb6SLionel Sambuc if (test__clzsi2(0x1C000000, 3))
95*4684ddb6SLionel Sambuc return 1;
96*4684ddb6SLionel Sambuc if (test__clzsi2(0x1D000000, 3))
97*4684ddb6SLionel Sambuc return 1;
98*4684ddb6SLionel Sambuc if (test__clzsi2(0x1E000000, 3))
99*4684ddb6SLionel Sambuc return 1;
100*4684ddb6SLionel Sambuc if (test__clzsi2(0x1F000000, 3))
101*4684ddb6SLionel Sambuc return 1;
102*4684ddb6SLionel Sambuc if (test__clzsi2(0x20000000, 2))
103*4684ddb6SLionel Sambuc return 1;
104*4684ddb6SLionel Sambuc if (test__clzsi2(0x21000000, 2))
105*4684ddb6SLionel Sambuc return 1;
106*4684ddb6SLionel Sambuc if (test__clzsi2(0x22000000, 2))
107*4684ddb6SLionel Sambuc return 1;
108*4684ddb6SLionel Sambuc if (test__clzsi2(0x23000000, 2))
109*4684ddb6SLionel Sambuc return 1;
110*4684ddb6SLionel Sambuc if (test__clzsi2(0x24000000, 2))
111*4684ddb6SLionel Sambuc return 1;
112*4684ddb6SLionel Sambuc if (test__clzsi2(0x25000000, 2))
113*4684ddb6SLionel Sambuc return 1;
114*4684ddb6SLionel Sambuc if (test__clzsi2(0x26000000, 2))
115*4684ddb6SLionel Sambuc return 1;
116*4684ddb6SLionel Sambuc if (test__clzsi2(0x27000000, 2))
117*4684ddb6SLionel Sambuc return 1;
118*4684ddb6SLionel Sambuc if (test__clzsi2(0x28000000, 2))
119*4684ddb6SLionel Sambuc return 1;
120*4684ddb6SLionel Sambuc if (test__clzsi2(0x29000000, 2))
121*4684ddb6SLionel Sambuc return 1;
122*4684ddb6SLionel Sambuc if (test__clzsi2(0x2A000000, 2))
123*4684ddb6SLionel Sambuc return 1;
124*4684ddb6SLionel Sambuc if (test__clzsi2(0x2B000000, 2))
125*4684ddb6SLionel Sambuc return 1;
126*4684ddb6SLionel Sambuc if (test__clzsi2(0x2C000000, 2))
127*4684ddb6SLionel Sambuc return 1;
128*4684ddb6SLionel Sambuc if (test__clzsi2(0x2D000000, 2))
129*4684ddb6SLionel Sambuc return 1;
130*4684ddb6SLionel Sambuc if (test__clzsi2(0x2E000000, 2))
131*4684ddb6SLionel Sambuc return 1;
132*4684ddb6SLionel Sambuc if (test__clzsi2(0x2F000000, 2))
133*4684ddb6SLionel Sambuc return 1;
134*4684ddb6SLionel Sambuc if (test__clzsi2(0x30000000, 2))
135*4684ddb6SLionel Sambuc return 1;
136*4684ddb6SLionel Sambuc if (test__clzsi2(0x31000000, 2))
137*4684ddb6SLionel Sambuc return 1;
138*4684ddb6SLionel Sambuc if (test__clzsi2(0x32000000, 2))
139*4684ddb6SLionel Sambuc return 1;
140*4684ddb6SLionel Sambuc if (test__clzsi2(0x33000000, 2))
141*4684ddb6SLionel Sambuc return 1;
142*4684ddb6SLionel Sambuc if (test__clzsi2(0x34000000, 2))
143*4684ddb6SLionel Sambuc return 1;
144*4684ddb6SLionel Sambuc if (test__clzsi2(0x35000000, 2))
145*4684ddb6SLionel Sambuc return 1;
146*4684ddb6SLionel Sambuc if (test__clzsi2(0x36000000, 2))
147*4684ddb6SLionel Sambuc return 1;
148*4684ddb6SLionel Sambuc if (test__clzsi2(0x37000000, 2))
149*4684ddb6SLionel Sambuc return 1;
150*4684ddb6SLionel Sambuc if (test__clzsi2(0x38000000, 2))
151*4684ddb6SLionel Sambuc return 1;
152*4684ddb6SLionel Sambuc if (test__clzsi2(0x39000000, 2))
153*4684ddb6SLionel Sambuc return 1;
154*4684ddb6SLionel Sambuc if (test__clzsi2(0x3A000000, 2))
155*4684ddb6SLionel Sambuc return 1;
156*4684ddb6SLionel Sambuc if (test__clzsi2(0x3B000000, 2))
157*4684ddb6SLionel Sambuc return 1;
158*4684ddb6SLionel Sambuc if (test__clzsi2(0x3C000000, 2))
159*4684ddb6SLionel Sambuc return 1;
160*4684ddb6SLionel Sambuc if (test__clzsi2(0x3D000000, 2))
161*4684ddb6SLionel Sambuc return 1;
162*4684ddb6SLionel Sambuc if (test__clzsi2(0x3E000000, 2))
163*4684ddb6SLionel Sambuc return 1;
164*4684ddb6SLionel Sambuc if (test__clzsi2(0x3F000000, 2))
165*4684ddb6SLionel Sambuc return 1;
166*4684ddb6SLionel Sambuc if (test__clzsi2(0x40000000, 1))
167*4684ddb6SLionel Sambuc return 1;
168*4684ddb6SLionel Sambuc if (test__clzsi2(0x41000000, 1))
169*4684ddb6SLionel Sambuc return 1;
170*4684ddb6SLionel Sambuc if (test__clzsi2(0x42000000, 1))
171*4684ddb6SLionel Sambuc return 1;
172*4684ddb6SLionel Sambuc if (test__clzsi2(0x43000000, 1))
173*4684ddb6SLionel Sambuc return 1;
174*4684ddb6SLionel Sambuc if (test__clzsi2(0x44000000, 1))
175*4684ddb6SLionel Sambuc return 1;
176*4684ddb6SLionel Sambuc if (test__clzsi2(0x45000000, 1))
177*4684ddb6SLionel Sambuc return 1;
178*4684ddb6SLionel Sambuc if (test__clzsi2(0x46000000, 1))
179*4684ddb6SLionel Sambuc return 1;
180*4684ddb6SLionel Sambuc if (test__clzsi2(0x47000000, 1))
181*4684ddb6SLionel Sambuc return 1;
182*4684ddb6SLionel Sambuc if (test__clzsi2(0x48000000, 1))
183*4684ddb6SLionel Sambuc return 1;
184*4684ddb6SLionel Sambuc if (test__clzsi2(0x49000000, 1))
185*4684ddb6SLionel Sambuc return 1;
186*4684ddb6SLionel Sambuc if (test__clzsi2(0x4A000000, 1))
187*4684ddb6SLionel Sambuc return 1;
188*4684ddb6SLionel Sambuc if (test__clzsi2(0x4B000000, 1))
189*4684ddb6SLionel Sambuc return 1;
190*4684ddb6SLionel Sambuc if (test__clzsi2(0x4C000000, 1))
191*4684ddb6SLionel Sambuc return 1;
192*4684ddb6SLionel Sambuc if (test__clzsi2(0x4D000000, 1))
193*4684ddb6SLionel Sambuc return 1;
194*4684ddb6SLionel Sambuc if (test__clzsi2(0x4E000000, 1))
195*4684ddb6SLionel Sambuc return 1;
196*4684ddb6SLionel Sambuc if (test__clzsi2(0x4F000000, 1))
197*4684ddb6SLionel Sambuc return 1;
198*4684ddb6SLionel Sambuc if (test__clzsi2(0x50000000, 1))
199*4684ddb6SLionel Sambuc return 1;
200*4684ddb6SLionel Sambuc if (test__clzsi2(0x51000000, 1))
201*4684ddb6SLionel Sambuc return 1;
202*4684ddb6SLionel Sambuc if (test__clzsi2(0x52000000, 1))
203*4684ddb6SLionel Sambuc return 1;
204*4684ddb6SLionel Sambuc if (test__clzsi2(0x53000000, 1))
205*4684ddb6SLionel Sambuc return 1;
206*4684ddb6SLionel Sambuc if (test__clzsi2(0x54000000, 1))
207*4684ddb6SLionel Sambuc return 1;
208*4684ddb6SLionel Sambuc if (test__clzsi2(0x55000000, 1))
209*4684ddb6SLionel Sambuc return 1;
210*4684ddb6SLionel Sambuc if (test__clzsi2(0x56000000, 1))
211*4684ddb6SLionel Sambuc return 1;
212*4684ddb6SLionel Sambuc if (test__clzsi2(0x57000000, 1))
213*4684ddb6SLionel Sambuc return 1;
214*4684ddb6SLionel Sambuc if (test__clzsi2(0x58000000, 1))
215*4684ddb6SLionel Sambuc return 1;
216*4684ddb6SLionel Sambuc if (test__clzsi2(0x59000000, 1))
217*4684ddb6SLionel Sambuc return 1;
218*4684ddb6SLionel Sambuc if (test__clzsi2(0x5A000000, 1))
219*4684ddb6SLionel Sambuc return 1;
220*4684ddb6SLionel Sambuc if (test__clzsi2(0x5B000000, 1))
221*4684ddb6SLionel Sambuc return 1;
222*4684ddb6SLionel Sambuc if (test__clzsi2(0x5C000000, 1))
223*4684ddb6SLionel Sambuc return 1;
224*4684ddb6SLionel Sambuc if (test__clzsi2(0x5D000000, 1))
225*4684ddb6SLionel Sambuc return 1;
226*4684ddb6SLionel Sambuc if (test__clzsi2(0x5E000000, 1))
227*4684ddb6SLionel Sambuc return 1;
228*4684ddb6SLionel Sambuc if (test__clzsi2(0x5F000000, 1))
229*4684ddb6SLionel Sambuc return 1;
230*4684ddb6SLionel Sambuc if (test__clzsi2(0x60000000, 1))
231*4684ddb6SLionel Sambuc return 1;
232*4684ddb6SLionel Sambuc if (test__clzsi2(0x61000000, 1))
233*4684ddb6SLionel Sambuc return 1;
234*4684ddb6SLionel Sambuc if (test__clzsi2(0x62000000, 1))
235*4684ddb6SLionel Sambuc return 1;
236*4684ddb6SLionel Sambuc if (test__clzsi2(0x63000000, 1))
237*4684ddb6SLionel Sambuc return 1;
238*4684ddb6SLionel Sambuc if (test__clzsi2(0x64000000, 1))
239*4684ddb6SLionel Sambuc return 1;
240*4684ddb6SLionel Sambuc if (test__clzsi2(0x65000000, 1))
241*4684ddb6SLionel Sambuc return 1;
242*4684ddb6SLionel Sambuc if (test__clzsi2(0x66000000, 1))
243*4684ddb6SLionel Sambuc return 1;
244*4684ddb6SLionel Sambuc if (test__clzsi2(0x67000000, 1))
245*4684ddb6SLionel Sambuc return 1;
246*4684ddb6SLionel Sambuc if (test__clzsi2(0x68000000, 1))
247*4684ddb6SLionel Sambuc return 1;
248*4684ddb6SLionel Sambuc if (test__clzsi2(0x69000000, 1))
249*4684ddb6SLionel Sambuc return 1;
250*4684ddb6SLionel Sambuc if (test__clzsi2(0x6A000000, 1))
251*4684ddb6SLionel Sambuc return 1;
252*4684ddb6SLionel Sambuc if (test__clzsi2(0x6B000000, 1))
253*4684ddb6SLionel Sambuc return 1;
254*4684ddb6SLionel Sambuc if (test__clzsi2(0x6C000000, 1))
255*4684ddb6SLionel Sambuc return 1;
256*4684ddb6SLionel Sambuc if (test__clzsi2(0x6D000000, 1))
257*4684ddb6SLionel Sambuc return 1;
258*4684ddb6SLionel Sambuc if (test__clzsi2(0x6E000000, 1))
259*4684ddb6SLionel Sambuc return 1;
260*4684ddb6SLionel Sambuc if (test__clzsi2(0x6F000000, 1))
261*4684ddb6SLionel Sambuc return 1;
262*4684ddb6SLionel Sambuc if (test__clzsi2(0x70000000, 1))
263*4684ddb6SLionel Sambuc return 1;
264*4684ddb6SLionel Sambuc if (test__clzsi2(0x71000000, 1))
265*4684ddb6SLionel Sambuc return 1;
266*4684ddb6SLionel Sambuc if (test__clzsi2(0x72000000, 1))
267*4684ddb6SLionel Sambuc return 1;
268*4684ddb6SLionel Sambuc if (test__clzsi2(0x73000000, 1))
269*4684ddb6SLionel Sambuc return 1;
270*4684ddb6SLionel Sambuc if (test__clzsi2(0x74000000, 1))
271*4684ddb6SLionel Sambuc return 1;
272*4684ddb6SLionel Sambuc if (test__clzsi2(0x75000000, 1))
273*4684ddb6SLionel Sambuc return 1;
274*4684ddb6SLionel Sambuc if (test__clzsi2(0x76000000, 1))
275*4684ddb6SLionel Sambuc return 1;
276*4684ddb6SLionel Sambuc if (test__clzsi2(0x77000000, 1))
277*4684ddb6SLionel Sambuc return 1;
278*4684ddb6SLionel Sambuc if (test__clzsi2(0x78000000, 1))
279*4684ddb6SLionel Sambuc return 1;
280*4684ddb6SLionel Sambuc if (test__clzsi2(0x79000000, 1))
281*4684ddb6SLionel Sambuc return 1;
282*4684ddb6SLionel Sambuc if (test__clzsi2(0x7A000000, 1))
283*4684ddb6SLionel Sambuc return 1;
284*4684ddb6SLionel Sambuc if (test__clzsi2(0x7B000000, 1))
285*4684ddb6SLionel Sambuc return 1;
286*4684ddb6SLionel Sambuc if (test__clzsi2(0x7C000000, 1))
287*4684ddb6SLionel Sambuc return 1;
288*4684ddb6SLionel Sambuc if (test__clzsi2(0x7D000000, 1))
289*4684ddb6SLionel Sambuc return 1;
290*4684ddb6SLionel Sambuc if (test__clzsi2(0x7E000000, 1))
291*4684ddb6SLionel Sambuc return 1;
292*4684ddb6SLionel Sambuc if (test__clzsi2(0x7F000000, 1))
293*4684ddb6SLionel Sambuc return 1;
294*4684ddb6SLionel Sambuc if (test__clzsi2(0x80000000, 0))
295*4684ddb6SLionel Sambuc return 1;
296*4684ddb6SLionel Sambuc if (test__clzsi2(0x81000000, 0))
297*4684ddb6SLionel Sambuc return 1;
298*4684ddb6SLionel Sambuc if (test__clzsi2(0x82000000, 0))
299*4684ddb6SLionel Sambuc return 1;
300*4684ddb6SLionel Sambuc if (test__clzsi2(0x83000000, 0))
301*4684ddb6SLionel Sambuc return 1;
302*4684ddb6SLionel Sambuc if (test__clzsi2(0x84000000, 0))
303*4684ddb6SLionel Sambuc return 1;
304*4684ddb6SLionel Sambuc if (test__clzsi2(0x85000000, 0))
305*4684ddb6SLionel Sambuc return 1;
306*4684ddb6SLionel Sambuc if (test__clzsi2(0x86000000, 0))
307*4684ddb6SLionel Sambuc return 1;
308*4684ddb6SLionel Sambuc if (test__clzsi2(0x87000000, 0))
309*4684ddb6SLionel Sambuc return 1;
310*4684ddb6SLionel Sambuc if (test__clzsi2(0x88000000, 0))
311*4684ddb6SLionel Sambuc return 1;
312*4684ddb6SLionel Sambuc if (test__clzsi2(0x89000000, 0))
313*4684ddb6SLionel Sambuc return 1;
314*4684ddb6SLionel Sambuc if (test__clzsi2(0x8A000000, 0))
315*4684ddb6SLionel Sambuc return 1;
316*4684ddb6SLionel Sambuc if (test__clzsi2(0x8B000000, 0))
317*4684ddb6SLionel Sambuc return 1;
318*4684ddb6SLionel Sambuc if (test__clzsi2(0x8C000000, 0))
319*4684ddb6SLionel Sambuc return 1;
320*4684ddb6SLionel Sambuc if (test__clzsi2(0x8D000000, 0))
321*4684ddb6SLionel Sambuc return 1;
322*4684ddb6SLionel Sambuc if (test__clzsi2(0x8E000000, 0))
323*4684ddb6SLionel Sambuc return 1;
324*4684ddb6SLionel Sambuc if (test__clzsi2(0x8F000000, 0))
325*4684ddb6SLionel Sambuc return 1;
326*4684ddb6SLionel Sambuc if (test__clzsi2(0x90000000, 0))
327*4684ddb6SLionel Sambuc return 1;
328*4684ddb6SLionel Sambuc if (test__clzsi2(0x91000000, 0))
329*4684ddb6SLionel Sambuc return 1;
330*4684ddb6SLionel Sambuc if (test__clzsi2(0x92000000, 0))
331*4684ddb6SLionel Sambuc return 1;
332*4684ddb6SLionel Sambuc if (test__clzsi2(0x93000000, 0))
333*4684ddb6SLionel Sambuc return 1;
334*4684ddb6SLionel Sambuc if (test__clzsi2(0x94000000, 0))
335*4684ddb6SLionel Sambuc return 1;
336*4684ddb6SLionel Sambuc if (test__clzsi2(0x95000000, 0))
337*4684ddb6SLionel Sambuc return 1;
338*4684ddb6SLionel Sambuc if (test__clzsi2(0x96000000, 0))
339*4684ddb6SLionel Sambuc return 1;
340*4684ddb6SLionel Sambuc if (test__clzsi2(0x97000000, 0))
341*4684ddb6SLionel Sambuc return 1;
342*4684ddb6SLionel Sambuc if (test__clzsi2(0x98000000, 0))
343*4684ddb6SLionel Sambuc return 1;
344*4684ddb6SLionel Sambuc if (test__clzsi2(0x99000000, 0))
345*4684ddb6SLionel Sambuc return 1;
346*4684ddb6SLionel Sambuc if (test__clzsi2(0x9A000000, 0))
347*4684ddb6SLionel Sambuc return 1;
348*4684ddb6SLionel Sambuc if (test__clzsi2(0x9B000000, 0))
349*4684ddb6SLionel Sambuc return 1;
350*4684ddb6SLionel Sambuc if (test__clzsi2(0x9C000000, 0))
351*4684ddb6SLionel Sambuc return 1;
352*4684ddb6SLionel Sambuc if (test__clzsi2(0x9D000000, 0))
353*4684ddb6SLionel Sambuc return 1;
354*4684ddb6SLionel Sambuc if (test__clzsi2(0x9E000000, 0))
355*4684ddb6SLionel Sambuc return 1;
356*4684ddb6SLionel Sambuc if (test__clzsi2(0x9F000000, 0))
357*4684ddb6SLionel Sambuc return 1;
358*4684ddb6SLionel Sambuc if (test__clzsi2(0xA0000000, 0))
359*4684ddb6SLionel Sambuc return 1;
360*4684ddb6SLionel Sambuc if (test__clzsi2(0xA1000000, 0))
361*4684ddb6SLionel Sambuc return 1;
362*4684ddb6SLionel Sambuc if (test__clzsi2(0xA2000000, 0))
363*4684ddb6SLionel Sambuc return 1;
364*4684ddb6SLionel Sambuc if (test__clzsi2(0xA3000000, 0))
365*4684ddb6SLionel Sambuc return 1;
366*4684ddb6SLionel Sambuc if (test__clzsi2(0xA4000000, 0))
367*4684ddb6SLionel Sambuc return 1;
368*4684ddb6SLionel Sambuc if (test__clzsi2(0xA5000000, 0))
369*4684ddb6SLionel Sambuc return 1;
370*4684ddb6SLionel Sambuc if (test__clzsi2(0xA6000000, 0))
371*4684ddb6SLionel Sambuc return 1;
372*4684ddb6SLionel Sambuc if (test__clzsi2(0xA7000000, 0))
373*4684ddb6SLionel Sambuc return 1;
374*4684ddb6SLionel Sambuc if (test__clzsi2(0xA8000000, 0))
375*4684ddb6SLionel Sambuc return 1;
376*4684ddb6SLionel Sambuc if (test__clzsi2(0xA9000000, 0))
377*4684ddb6SLionel Sambuc return 1;
378*4684ddb6SLionel Sambuc if (test__clzsi2(0xAA000000, 0))
379*4684ddb6SLionel Sambuc return 1;
380*4684ddb6SLionel Sambuc if (test__clzsi2(0xAB000000, 0))
381*4684ddb6SLionel Sambuc return 1;
382*4684ddb6SLionel Sambuc if (test__clzsi2(0xAC000000, 0))
383*4684ddb6SLionel Sambuc return 1;
384*4684ddb6SLionel Sambuc if (test__clzsi2(0xAD000000, 0))
385*4684ddb6SLionel Sambuc return 1;
386*4684ddb6SLionel Sambuc if (test__clzsi2(0xAE000000, 0))
387*4684ddb6SLionel Sambuc return 1;
388*4684ddb6SLionel Sambuc if (test__clzsi2(0xAF000000, 0))
389*4684ddb6SLionel Sambuc return 1;
390*4684ddb6SLionel Sambuc if (test__clzsi2(0xB0000000, 0))
391*4684ddb6SLionel Sambuc return 1;
392*4684ddb6SLionel Sambuc if (test__clzsi2(0xB1000000, 0))
393*4684ddb6SLionel Sambuc return 1;
394*4684ddb6SLionel Sambuc if (test__clzsi2(0xB2000000, 0))
395*4684ddb6SLionel Sambuc return 1;
396*4684ddb6SLionel Sambuc if (test__clzsi2(0xB3000000, 0))
397*4684ddb6SLionel Sambuc return 1;
398*4684ddb6SLionel Sambuc if (test__clzsi2(0xB4000000, 0))
399*4684ddb6SLionel Sambuc return 1;
400*4684ddb6SLionel Sambuc if (test__clzsi2(0xB5000000, 0))
401*4684ddb6SLionel Sambuc return 1;
402*4684ddb6SLionel Sambuc if (test__clzsi2(0xB6000000, 0))
403*4684ddb6SLionel Sambuc return 1;
404*4684ddb6SLionel Sambuc if (test__clzsi2(0xB7000000, 0))
405*4684ddb6SLionel Sambuc return 1;
406*4684ddb6SLionel Sambuc if (test__clzsi2(0xB8000000, 0))
407*4684ddb6SLionel Sambuc return 1;
408*4684ddb6SLionel Sambuc if (test__clzsi2(0xB9000000, 0))
409*4684ddb6SLionel Sambuc return 1;
410*4684ddb6SLionel Sambuc if (test__clzsi2(0xBA000000, 0))
411*4684ddb6SLionel Sambuc return 1;
412*4684ddb6SLionel Sambuc if (test__clzsi2(0xBB000000, 0))
413*4684ddb6SLionel Sambuc return 1;
414*4684ddb6SLionel Sambuc if (test__clzsi2(0xBC000000, 0))
415*4684ddb6SLionel Sambuc return 1;
416*4684ddb6SLionel Sambuc if (test__clzsi2(0xBD000000, 0))
417*4684ddb6SLionel Sambuc return 1;
418*4684ddb6SLionel Sambuc if (test__clzsi2(0xBE000000, 0))
419*4684ddb6SLionel Sambuc return 1;
420*4684ddb6SLionel Sambuc if (test__clzsi2(0xBF000000, 0))
421*4684ddb6SLionel Sambuc return 1;
422*4684ddb6SLionel Sambuc if (test__clzsi2(0xC0000000, 0))
423*4684ddb6SLionel Sambuc return 1;
424*4684ddb6SLionel Sambuc if (test__clzsi2(0xC1000000, 0))
425*4684ddb6SLionel Sambuc return 1;
426*4684ddb6SLionel Sambuc if (test__clzsi2(0xC2000000, 0))
427*4684ddb6SLionel Sambuc return 1;
428*4684ddb6SLionel Sambuc if (test__clzsi2(0xC3000000, 0))
429*4684ddb6SLionel Sambuc return 1;
430*4684ddb6SLionel Sambuc if (test__clzsi2(0xC4000000, 0))
431*4684ddb6SLionel Sambuc return 1;
432*4684ddb6SLionel Sambuc if (test__clzsi2(0xC5000000, 0))
433*4684ddb6SLionel Sambuc return 1;
434*4684ddb6SLionel Sambuc if (test__clzsi2(0xC6000000, 0))
435*4684ddb6SLionel Sambuc return 1;
436*4684ddb6SLionel Sambuc if (test__clzsi2(0xC7000000, 0))
437*4684ddb6SLionel Sambuc return 1;
438*4684ddb6SLionel Sambuc if (test__clzsi2(0xC8000000, 0))
439*4684ddb6SLionel Sambuc return 1;
440*4684ddb6SLionel Sambuc if (test__clzsi2(0xC9000000, 0))
441*4684ddb6SLionel Sambuc return 1;
442*4684ddb6SLionel Sambuc if (test__clzsi2(0xCA000000, 0))
443*4684ddb6SLionel Sambuc return 1;
444*4684ddb6SLionel Sambuc if (test__clzsi2(0xCB000000, 0))
445*4684ddb6SLionel Sambuc return 1;
446*4684ddb6SLionel Sambuc if (test__clzsi2(0xCC000000, 0))
447*4684ddb6SLionel Sambuc return 1;
448*4684ddb6SLionel Sambuc if (test__clzsi2(0xCD000000, 0))
449*4684ddb6SLionel Sambuc return 1;
450*4684ddb6SLionel Sambuc if (test__clzsi2(0xCE000000, 0))
451*4684ddb6SLionel Sambuc return 1;
452*4684ddb6SLionel Sambuc if (test__clzsi2(0xCF000000, 0))
453*4684ddb6SLionel Sambuc return 1;
454*4684ddb6SLionel Sambuc if (test__clzsi2(0xD0000000, 0))
455*4684ddb6SLionel Sambuc return 1;
456*4684ddb6SLionel Sambuc if (test__clzsi2(0xD1000000, 0))
457*4684ddb6SLionel Sambuc return 1;
458*4684ddb6SLionel Sambuc if (test__clzsi2(0xD2000000, 0))
459*4684ddb6SLionel Sambuc return 1;
460*4684ddb6SLionel Sambuc if (test__clzsi2(0xD3000000, 0))
461*4684ddb6SLionel Sambuc return 1;
462*4684ddb6SLionel Sambuc if (test__clzsi2(0xD4000000, 0))
463*4684ddb6SLionel Sambuc return 1;
464*4684ddb6SLionel Sambuc if (test__clzsi2(0xD5000000, 0))
465*4684ddb6SLionel Sambuc return 1;
466*4684ddb6SLionel Sambuc if (test__clzsi2(0xD6000000, 0))
467*4684ddb6SLionel Sambuc return 1;
468*4684ddb6SLionel Sambuc if (test__clzsi2(0xD7000000, 0))
469*4684ddb6SLionel Sambuc return 1;
470*4684ddb6SLionel Sambuc if (test__clzsi2(0xD8000000, 0))
471*4684ddb6SLionel Sambuc return 1;
472*4684ddb6SLionel Sambuc if (test__clzsi2(0xD9000000, 0))
473*4684ddb6SLionel Sambuc return 1;
474*4684ddb6SLionel Sambuc if (test__clzsi2(0xDA000000, 0))
475*4684ddb6SLionel Sambuc return 1;
476*4684ddb6SLionel Sambuc if (test__clzsi2(0xDB000000, 0))
477*4684ddb6SLionel Sambuc return 1;
478*4684ddb6SLionel Sambuc if (test__clzsi2(0xDC000000, 0))
479*4684ddb6SLionel Sambuc return 1;
480*4684ddb6SLionel Sambuc if (test__clzsi2(0xDD000000, 0))
481*4684ddb6SLionel Sambuc return 1;
482*4684ddb6SLionel Sambuc if (test__clzsi2(0xDE000000, 0))
483*4684ddb6SLionel Sambuc return 1;
484*4684ddb6SLionel Sambuc if (test__clzsi2(0xDF000000, 0))
485*4684ddb6SLionel Sambuc return 1;
486*4684ddb6SLionel Sambuc if (test__clzsi2(0xE0000000, 0))
487*4684ddb6SLionel Sambuc return 1;
488*4684ddb6SLionel Sambuc if (test__clzsi2(0xE1000000, 0))
489*4684ddb6SLionel Sambuc return 1;
490*4684ddb6SLionel Sambuc if (test__clzsi2(0xE2000000, 0))
491*4684ddb6SLionel Sambuc return 1;
492*4684ddb6SLionel Sambuc if (test__clzsi2(0xE3000000, 0))
493*4684ddb6SLionel Sambuc return 1;
494*4684ddb6SLionel Sambuc if (test__clzsi2(0xE4000000, 0))
495*4684ddb6SLionel Sambuc return 1;
496*4684ddb6SLionel Sambuc if (test__clzsi2(0xE5000000, 0))
497*4684ddb6SLionel Sambuc return 1;
498*4684ddb6SLionel Sambuc if (test__clzsi2(0xE6000000, 0))
499*4684ddb6SLionel Sambuc return 1;
500*4684ddb6SLionel Sambuc if (test__clzsi2(0xE7000000, 0))
501*4684ddb6SLionel Sambuc return 1;
502*4684ddb6SLionel Sambuc if (test__clzsi2(0xE8000000, 0))
503*4684ddb6SLionel Sambuc return 1;
504*4684ddb6SLionel Sambuc if (test__clzsi2(0xE9000000, 0))
505*4684ddb6SLionel Sambuc return 1;
506*4684ddb6SLionel Sambuc if (test__clzsi2(0xEA000000, 0))
507*4684ddb6SLionel Sambuc return 1;
508*4684ddb6SLionel Sambuc if (test__clzsi2(0xEB000000, 0))
509*4684ddb6SLionel Sambuc return 1;
510*4684ddb6SLionel Sambuc if (test__clzsi2(0xEC000000, 0))
511*4684ddb6SLionel Sambuc return 1;
512*4684ddb6SLionel Sambuc if (test__clzsi2(0xED000000, 0))
513*4684ddb6SLionel Sambuc return 1;
514*4684ddb6SLionel Sambuc if (test__clzsi2(0xEE000000, 0))
515*4684ddb6SLionel Sambuc return 1;
516*4684ddb6SLionel Sambuc if (test__clzsi2(0xEF000000, 0))
517*4684ddb6SLionel Sambuc return 1;
518*4684ddb6SLionel Sambuc if (test__clzsi2(0xF0000000, 0))
519*4684ddb6SLionel Sambuc return 1;
520*4684ddb6SLionel Sambuc if (test__clzsi2(0xF1000000, 0))
521*4684ddb6SLionel Sambuc return 1;
522*4684ddb6SLionel Sambuc if (test__clzsi2(0xF2000000, 0))
523*4684ddb6SLionel Sambuc return 1;
524*4684ddb6SLionel Sambuc if (test__clzsi2(0xF3000000, 0))
525*4684ddb6SLionel Sambuc return 1;
526*4684ddb6SLionel Sambuc if (test__clzsi2(0xF4000000, 0))
527*4684ddb6SLionel Sambuc return 1;
528*4684ddb6SLionel Sambuc if (test__clzsi2(0xF5000000, 0))
529*4684ddb6SLionel Sambuc return 1;
530*4684ddb6SLionel Sambuc if (test__clzsi2(0xF6000000, 0))
531*4684ddb6SLionel Sambuc return 1;
532*4684ddb6SLionel Sambuc if (test__clzsi2(0xF7000000, 0))
533*4684ddb6SLionel Sambuc return 1;
534*4684ddb6SLionel Sambuc if (test__clzsi2(0xF8000000, 0))
535*4684ddb6SLionel Sambuc return 1;
536*4684ddb6SLionel Sambuc if (test__clzsi2(0xF9000000, 0))
537*4684ddb6SLionel Sambuc return 1;
538*4684ddb6SLionel Sambuc if (test__clzsi2(0xFA000000, 0))
539*4684ddb6SLionel Sambuc return 1;
540*4684ddb6SLionel Sambuc if (test__clzsi2(0xFB000000, 0))
541*4684ddb6SLionel Sambuc return 1;
542*4684ddb6SLionel Sambuc if (test__clzsi2(0xFC000000, 0))
543*4684ddb6SLionel Sambuc return 1;
544*4684ddb6SLionel Sambuc if (test__clzsi2(0xFD000000, 0))
545*4684ddb6SLionel Sambuc return 1;
546*4684ddb6SLionel Sambuc if (test__clzsi2(0xFE000000, 0))
547*4684ddb6SLionel Sambuc return 1;
548*4684ddb6SLionel Sambuc if (test__clzsi2(0xFF000000, 0))
549*4684ddb6SLionel Sambuc return 1;
550*4684ddb6SLionel Sambuc
551*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000001, 31))
552*4684ddb6SLionel Sambuc return 1;
553*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000002, 30))
554*4684ddb6SLionel Sambuc return 1;
555*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000004, 29))
556*4684ddb6SLionel Sambuc return 1;
557*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000008, 28))
558*4684ddb6SLionel Sambuc return 1;
559*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000010, 27))
560*4684ddb6SLionel Sambuc return 1;
561*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000020, 26))
562*4684ddb6SLionel Sambuc return 1;
563*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000040, 25))
564*4684ddb6SLionel Sambuc return 1;
565*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000080, 24))
566*4684ddb6SLionel Sambuc return 1;
567*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000100, 23))
568*4684ddb6SLionel Sambuc return 1;
569*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000200, 22))
570*4684ddb6SLionel Sambuc return 1;
571*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000400, 21))
572*4684ddb6SLionel Sambuc return 1;
573*4684ddb6SLionel Sambuc if (test__clzsi2(0x00000800, 20))
574*4684ddb6SLionel Sambuc return 1;
575*4684ddb6SLionel Sambuc if (test__clzsi2(0x00001000, 19))
576*4684ddb6SLionel Sambuc return 1;
577*4684ddb6SLionel Sambuc if (test__clzsi2(0x00002000, 18))
578*4684ddb6SLionel Sambuc return 1;
579*4684ddb6SLionel Sambuc if (test__clzsi2(0x00004000, 17))
580*4684ddb6SLionel Sambuc return 1;
581*4684ddb6SLionel Sambuc if (test__clzsi2(0x00008000, 16))
582*4684ddb6SLionel Sambuc return 1;
583*4684ddb6SLionel Sambuc if (test__clzsi2(0x00010000, 15))
584*4684ddb6SLionel Sambuc return 1;
585*4684ddb6SLionel Sambuc if (test__clzsi2(0x00020000, 14))
586*4684ddb6SLionel Sambuc return 1;
587*4684ddb6SLionel Sambuc if (test__clzsi2(0x00040000, 13))
588*4684ddb6SLionel Sambuc return 1;
589*4684ddb6SLionel Sambuc if (test__clzsi2(0x00080000, 12))
590*4684ddb6SLionel Sambuc return 1;
591*4684ddb6SLionel Sambuc if (test__clzsi2(0x00100000, 11))
592*4684ddb6SLionel Sambuc return 1;
593*4684ddb6SLionel Sambuc if (test__clzsi2(0x00200000, 10))
594*4684ddb6SLionel Sambuc return 1;
595*4684ddb6SLionel Sambuc if (test__clzsi2(0x00400000, 9))
596*4684ddb6SLionel Sambuc return 1;
597*4684ddb6SLionel Sambuc
598*4684ddb6SLionel Sambuc return 0;
599*4684ddb6SLionel Sambuc }
600