BR3392253: Fix potential buffer overflow in number conversion
[nasm.git] / test / ilog2.asm
blob2796af80e0a3516668e7b2ddb750357fbf9a7a78
1 %use ifunc
3 db ilog2(0x1)
4 db ilog2(0x2)
5 db ilog2(0x4)
6 db ilog2(0x8)
7 db ilog2(0x10)
8 db ilog2(0x20)
9 db ilog2(0x40)
10 db ilog2(0x80)
11 db ilog2(0x100)
12 db ilog2(0x200)
13 db ilog2(0x400)
14 db ilog2(0x800)
15 db ilog2(0x1000)
16 db ilog2(0x2000)
17 db ilog2(0x4000)
18 db ilog2(0x8000)
19 db ilog2(0x10000)
20 db ilog2(0x20000)
21 db ilog2(0x40000)
22 db ilog2(0x80000)
23 db ilog2(0x100000)
24 db ilog2(0x200000)
25 db ilog2(0x400000)
26 db ilog2(0x800000)
27 db ilog2(0x1000000)
28 db ilog2(0x2000000)
29 db ilog2(0x4000000)
30 db ilog2(0x8000000)
31 db ilog2(0x10000000)
32 db ilog2(0x20000000)
33 db ilog2(0x40000000)
34 db ilog2(0x80000000)
36 db ilog2w(0x1)
37 db ilog2w(0x2)
38 db ilog2w(0x4)
39 db ilog2w(0x8)
40 db ilog2w(0x10)
41 db ilog2w(0x20)
42 db ilog2w(0x40)
43 db ilog2w(0x80)
44 db ilog2w(0x100)
45 db ilog2w(0x200)
46 db ilog2w(0x400)
47 db ilog2w(0x800)
48 db ilog2w(0x1000)
49 db ilog2w(0x2000)
50 db ilog2w(0x4000)
51 db ilog2w(0x8000)
52 db ilog2w(0x10000)
53 db ilog2w(0x20000)
54 db ilog2w(0x40000)
55 db ilog2w(0x80000)
56 db ilog2w(0x100000)
57 db ilog2w(0x200000)
58 db ilog2w(0x400000)
59 db ilog2w(0x800000)
60 db ilog2w(0x1000000)
61 db ilog2w(0x2000000)
62 db ilog2w(0x4000000)
63 db ilog2w(0x8000000)
64 db ilog2w(0x10000000)
65 db ilog2w(0x20000000)
66 db ilog2w(0x40000000)
67 db ilog2w(0x80000000)
69 db ilog2f(0x1)
70 db ilog2f(0x2)
71 db ilog2f(0x4)
72 db ilog2f(0x8)
73 db ilog2f(0x10)
74 db ilog2f(0x20)
75 db ilog2f(0x40)
76 db ilog2f(0x80)
77 db ilog2f(0x100)
78 db ilog2f(0x200)
79 db ilog2f(0x400)
80 db ilog2f(0x800)
81 db ilog2f(0x1000)
82 db ilog2f(0x2000)
83 db ilog2f(0x4000)
84 db ilog2f(0x8000)
85 db ilog2f(0x10000)
86 db ilog2f(0x20000)
87 db ilog2f(0x40000)
88 db ilog2f(0x80000)
89 db ilog2f(0x100000)
90 db ilog2f(0x200000)
91 db ilog2f(0x400000)
92 db ilog2f(0x800000)
93 db ilog2f(0x1000000)
94 db ilog2f(0x2000000)
95 db ilog2f(0x4000000)
96 db ilog2f(0x8000000)
97 db ilog2f(0x10000000)
98 db ilog2f(0x20000000)
99 db ilog2f(0x40000000)
100 db ilog2f(0x80000000)
102 db ilog2c(0x1)
103 db ilog2c(0x2)
104 db ilog2c(0x4)
105 db ilog2c(0x8)
106 db ilog2c(0x10)
107 db ilog2c(0x20)
108 db ilog2c(0x40)
109 db ilog2c(0x80)
110 db ilog2c(0x100)
111 db ilog2c(0x200)
112 db ilog2c(0x400)
113 db ilog2c(0x800)
114 db ilog2c(0x1000)
115 db ilog2c(0x2000)
116 db ilog2c(0x4000)
117 db ilog2c(0x8000)
118 db ilog2c(0x10000)
119 db ilog2c(0x20000)
120 db ilog2c(0x40000)
121 db ilog2c(0x80000)
122 db ilog2c(0x100000)
123 db ilog2c(0x200000)
124 db ilog2c(0x400000)
125 db ilog2c(0x800000)
126 db ilog2c(0x1000000)
127 db ilog2c(0x2000000)
128 db ilog2c(0x4000000)
129 db ilog2c(0x8000000)
130 db ilog2c(0x10000000)
131 db ilog2c(0x20000000)
132 db ilog2c(0x40000000)
133 db ilog2c(0x80000000)
135 %ifdef ERROR
136 db ilog2(0x0)
137 db ilog2(0x3)
138 db ilog2(0x5)
139 db ilog2(0x9)
140 db ilog2(0x10)
141 db ilog2(0x30)
142 db ilog2(0x50)
143 db ilog2(0x90)
144 db ilog2(0x100)
145 db ilog2(0x300)
146 db ilog2(0x500)
147 db ilog2(0x900)
148 db ilog2(0x1000)
149 db ilog2(0x3000)
150 db ilog2(0x5000)
151 db ilog2(0x9000)
152 db ilog2(0x10000)
153 db ilog2(0x30000)
154 db ilog2(0x50000)
155 db ilog2(0x90000)
156 db ilog2(0x100000)
157 db ilog2(0x300000)
158 db ilog2(0x500000)
159 db ilog2(0x900000)
160 db ilog2(0x1000000)
161 db ilog2(0x3000000)
162 db ilog2(0x5000000)
163 db ilog2(0x9000000)
164 db ilog2(0x10000000)
165 db ilog2(0x30000000)
166 db ilog2(0x50000000)
167 db ilog2(0x90000000)
168 %endif
170 %ifdef WARNING
171 db ilog2w(0x0)
172 db ilog2w(0x3)
173 db ilog2w(0x5)
174 db ilog2w(0x9)
175 db ilog2w(0x10)
176 db ilog2w(0x30)
177 db ilog2w(0x50)
178 db ilog2w(0x90)
179 db ilog2w(0x100)
180 db ilog2w(0x300)
181 db ilog2w(0x500)
182 db ilog2w(0x900)
183 db ilog2w(0x1000)
184 db ilog2w(0x3000)
185 db ilog2w(0x5000)
186 db ilog2w(0x9000)
187 db ilog2w(0x10000)
188 db ilog2w(0x30000)
189 db ilog2w(0x50000)
190 db ilog2w(0x90000)
191 db ilog2w(0x100000)
192 db ilog2w(0x300000)
193 db ilog2w(0x500000)
194 db ilog2w(0x900000)
195 db ilog2w(0x1000000)
196 db ilog2w(0x3000000)
197 db ilog2w(0x5000000)
198 db ilog2w(0x9000000)
199 db ilog2w(0x10000000)
200 db ilog2w(0x30000000)
201 db ilog2w(0x50000000)
202 db ilog2w(0x90000000)
203 %endif
205 db ilog2f(0x0)
206 db ilog2f(0x1)
207 db ilog2f(0x3)
208 db ilog2f(0x5)
209 db ilog2f(0x9)
210 db ilog2f(0x10)
211 db ilog2f(0x30)
212 db ilog2f(0x50)
213 db ilog2f(0x90)
214 db ilog2f(0x100)
215 db ilog2f(0x300)
216 db ilog2f(0x500)
217 db ilog2f(0x900)
218 db ilog2f(0x1000)
219 db ilog2f(0x3000)
220 db ilog2f(0x5000)
221 db ilog2f(0x9000)
222 db ilog2f(0x10000)
223 db ilog2f(0x30000)
224 db ilog2f(0x50000)
225 db ilog2f(0x90000)
226 db ilog2f(0x100000)
227 db ilog2f(0x300000)
228 db ilog2f(0x500000)
229 db ilog2f(0x900000)
230 db ilog2f(0x1000000)
231 db ilog2f(0x3000000)
232 db ilog2f(0x5000000)
233 db ilog2f(0x9000000)
234 db ilog2f(0x10000000)
235 db ilog2f(0x30000000)
236 db ilog2f(0x50000000)
237 db ilog2f(0x90000000)
239 db ilog2c(0x0)
240 db ilog2c(0x1)
241 db ilog2c(0x3)
242 db ilog2c(0x5)
243 db ilog2c(0x9)
244 db ilog2c(0x10)
245 db ilog2c(0x30)
246 db ilog2c(0x50)
247 db ilog2c(0x90)
248 db ilog2c(0x100)
249 db ilog2c(0x300)
250 db ilog2c(0x500)
251 db ilog2c(0x900)
252 db ilog2c(0x1000)
253 db ilog2c(0x3000)
254 db ilog2c(0x5000)
255 db ilog2c(0x9000)
256 db ilog2c(0x10000)
257 db ilog2c(0x30000)
258 db ilog2c(0x50000)
259 db ilog2c(0x90000)
260 db ilog2c(0x100000)
261 db ilog2c(0x300000)
262 db ilog2c(0x500000)
263 db ilog2c(0x900000)
264 db ilog2c(0x1000000)
265 db ilog2c(0x3000000)
266 db ilog2c(0x5000000)
267 db ilog2c(0x9000000)
268 db ilog2c(0x10000000)
269 db ilog2c(0x30000000)
270 db ilog2c(0x50000000)
271 db ilog2c(0x90000000)