2 !!DESCRIPTION!! Addition tests
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 SUPPORT_BIT_TYPES
31 unsigned int aint0 = 0;
32 unsigned int aint1 = 0;
33 unsigned char achar0 = 0;
34 unsigned char achar1 = 0;
35 unsigned char achar2 = 0;
36 unsigned char achar3 = 0;
37 unsigned char *acharP = 0;
44 void add_lit2uchar(void)
56 achar0 = achar0 +1; /*Should be an increment */
60 for(achar1 = 0; achar1 < 100; achar1++)
67 void add_uchar2uchar(void)
69 achar1 = achar1 + achar0;
74 for(achar2 = 0; achar2<7; achar2++)
84 achar2, achar3 can be anything.
86 void add_uchar2uchar2(void)
99 achar2 = achar1 + achar0;
103 achar3 = achar2 + achar1 + achar0;
108 #ifdef SUPPORT_BIT_TYPES
122 #ifdef SUPPORT_BIT_ARITHMETIC
127 bit3 = bit4+bit5+bit6+bit7+bit0;
133 /* add_bit2uchar(void) - assumes bit0 = 1, achar0 = 7 */
135 void add_bit2uchar(void)
146 void add_bit2uint(void)
169 #ifdef SUPPORT_BIT_TYPES
178 printf("failures: %d\n",failures);