2 !!DESCRIPTION!! Shift ints left and right
3 !!ORIGIN!! SDCC regression tests
4 !!LICENCE!! GPL, read COPYING.GPL
10 unsigned char success=0;
11 unsigned char failures=0;
12 unsigned char dummy=0;
14 #ifdef SIZEOF_INT_16BIT
15 #if defined(__LINUX__) || defined(LINUX)
16 signed short aint0 = 0;
17 signed short aint1 = 0;
32 signed char achar0 = 0;
33 signed char achar1 = 0;
34 signed char achar2 = 0;
35 signed char achar3 = 0;
43 void shift_int_left_1(void)
48 void shift_int_left_2(void)
53 void shift_int_left_3(void)
58 void shift_int_left_4(void)
63 void shift_int_left_5(void)
68 void shift_int_left_6(void)
73 void shift_int_left_7(void)
78 void shift_int_left_8(void)
83 void shift_int_left_9(void)
88 void shift_int_left_10(void)
93 void shift_int_left_11(void)
98 void shift_int_left_12(void)
103 void shift_int_left_13(void)
108 void shift_int_left_14(void)
113 void shift_int_left_15(void)
118 /*****************************************************/
119 void shift_int_right_1(void)
124 void shift_int_right_2(void)
129 void shift_int_right_3(void)
134 void shift_int_right_4(void)
139 void shift_int_right_5(void)
144 void shift_int_right_6(void)
149 void shift_int_right_7(void)
154 void shift_int_right_8(void)
159 void shift_int_right_9(void)
164 void shift_int_right_10(void)
169 void shift_int_right_11(void)
174 void shift_int_right_12(void)
179 void shift_int_right_13(void)
184 void shift_int_right_14(void)
189 void shift_int_right_15(void)
194 /*****************************************************/
203 printf("failures: %d\n",failures);
208 if((unsigned short)aint0 != 0xaf34)
210 printf("failures: %d\n",failures);
217 printf("failures: %d\n",failures);
222 if((unsigned short)aint0 != 0xbcd0)
224 printf("failures: %d\n",failures);
231 printf("failures: %d\n",failures);
236 if((unsigned short)aint0 != 0xf340)
238 printf("failures: %d\n",failures);
243 if((unsigned short)aint0 != 0xe680)
245 printf("failures: %d\n",failures);
250 if((unsigned short)aint0 != 0xcd00)
252 printf("failures: %d\n",failures);
257 if((unsigned short)aint0 != 0x9a00)
259 printf("failures: %d\n",failures);
266 printf("failures: %d\n",failures);
273 printf("failures: %d\n",failures);
278 if((unsigned short)aint0 != 0xd000)
280 printf("failures: %d\n",failures);
285 if((unsigned short)aint0 != 0xa000)
287 printf("failures: %d\n",failures);
294 printf("failures: %d\n",failures);
299 if((unsigned short)aint0 != 0x8000)
301 printf("failures: %d\n",failures);
303 /***********************/
307 if((unsigned short)aint0 != 0xd5e6)
309 printf("failures: %d\n",failures);
314 if((unsigned short)aint0 != 0xeaf3)
316 printf("failures: %d\n",failures);
321 if((unsigned short)aint0 != 0xf579)
323 printf("failures: %d\n",failures);
328 if((unsigned short)aint0 != 0xfabc)
330 printf("failures: %d\n",failures);
335 if((unsigned short)aint0 != 0xfd5e)
337 printf("failures: %d\n",failures);
342 if((unsigned short)aint0 != 0xfeaf)
344 printf("failures: %d\n",failures);
349 if((unsigned short)aint0 != 0xff57)
351 printf("failures: %d\n",failures);
356 if((unsigned short)aint0 != 0xffab)
358 printf("failures: %d\n",failures);
363 if((unsigned short)aint0 != 0xffd5)
365 printf("failures: %d\n",failures);
369 shift_int_right_10();
370 if((unsigned short)aint0 != 0xffea)
372 printf("failures: %d\n",failures);
376 shift_int_right_11();
377 if((unsigned short)aint0 != 0xfff5)
379 printf("failures: %d\n",failures);
383 shift_int_right_12();
384 if((unsigned short)aint0 != 0xfffa)
386 printf("failures: %d\n",failures);
390 shift_int_right_13();
391 if((unsigned short)aint0 != 0xfffd)
393 printf("failures: %d\n",failures);
397 shift_int_right_14();
398 if((unsigned short)aint0 != 0xfffe)
400 printf("failures: %d\n",failures);
404 shift_int_right_15();
410 printf("failures: %d\n",failures);