3 type: bit, char, short, long
7 /* This is not only a regression test, the focus of this test
8 is more on the generated code (volatile!). */
13 #if defined(PORT_HOST) || defined(SDCC_z80) || defined(SDCC_gbz80) || defined(SDCC_hc08)
17 #if defined(_bit) && !defined(NO_BIT_TYPE)
20 #elif defined(_bit) && defined(NO_BIT_TYPE)
21 # if defined(PORT_HOST)
22 # define MASK 0xffffffff
33 # define MASK 0xffffffff
35 # warning Unknown type
38 #if defined(PORT_HOST) || defined(SDCC_z80) || defined(SDCC_gbz80) || defined(SDCC_hc08)
43 /* the variable 'mask' is only defined to see if MASK is correctly set up */
44 code unsigned long mask = MASK;
47 volatile unsigned {type} uv;
48 /* an array would be nicer, but an array of bits isn't possible */
49 idata {type} a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 ,
50 a10, a11, a12, a13, a14, a15, a16, a17, a18, a19,
52 idata unsigned {type} ua0, ua1, ua2, ua3, ua4, ua5, ua6;
54 idata volatile unsigned {type} ub = 0xbe;
114 #if defined(_bit) && !defined(NO_BIT_TYPE)
117 ASSERT( a3 == ({type}) 0x33);
120 #if defined(_bit) && !defined(NO_BIT_TYPE)
123 ASSERT(ua1 == ({type}) 0x7b);
126 #if defined(_bit) && !defined(NO_BIT_TYPE)
129 ASSERT( a5 == ({type}) 0x33);
136 ASSERT( a10 == ({type}) MASK);
137 ASSERT( a11 == ({type}) MASK);
143 ASSERT( a15 == ({type}) MASK);
146 ASSERT( a17 == ({type}) MASK);
150 ASSERT( v == ({type}) MASK);