2 !!DESCRIPTION!! Addition tests - mostly int's
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 unsigned short aint0 = 0;
17 unsigned short aint1 = 0;
18 unsigned short aint2 = 0;
19 unsigned short aint3 = 0;
22 unsigned int aint0 = 0;
23 unsigned int aint1 = 0;
24 unsigned int aint2 = 0;
25 unsigned int aint3 = 0;
30 unsigned int aint0 = 0;
31 unsigned int aint1 = 0;
32 unsigned int aint2 = 0;
33 unsigned int aint3 = 0;
37 unsigned char achar0 = 0;
38 unsigned char achar1 = 0;
39 unsigned char achar2 = 0;
40 unsigned char achar3 = 0;
41 unsigned char *acharP = 0;
43 #ifdef SUPPORT_BIT_TYPES
65 void add_lit2uint(void)
77 aint0 = aint0 +1; /* Should be an increment */
81 for(aint1 = 0; aint1 < 100; aint1++)
88 void add_uint2uint (void)
90 aint1 = aint1 + aint0;
95 for(aint2 = 0; aint2<7; aint2++)
105 aint2, aint3 can be anything.
107 void add_uint2uint2(void)
120 aint2 = aint1 + aint0;
124 aint3 = aint2 + aint1 + aint0;
140 aint3 = aint2 + aint1 + aint0;
145 #ifdef SUPPORT_BIT_TYPES
163 bit3 = bit4+bit5+bit6+bit7+bit0;
168 /* add_bit2uchar(void) - assumes bit0 = 1, aint0 = 7 */
170 void add_bit2uchar(void)
181 void add_bit2uint(void)
192 /***********************************/
309 #ifdef SUPPORT_BIT_TYPES
325 printf("failures: %d\n",failures);