14 * function genAnd() and genOr() in z80/gen.c
15 * were not prepared to handle the special case where ifx == 0
18 void void_tand1(char x)
20 char y = (identity(x) & 1) ? 42 : 43;
23 void void_tand0(char x)
25 char y = (identity(x) & 0) ? 42 : 43;
29 * function genOr() in z80/gen.c
30 * assumed identity of "or a, literal" and "or a,a"
31 * thats definitly not so
36 char y = (identity(x) | 1) ? 42 : 43;
42 char y = (identity(x) | 0) ? 42 : 43;
48 char y = (identity(x) & 1) ? 42 : 43;
54 char y = (identity(x) & 0) ? 42 : 43;
59 * mcs51 segmentation fault
61 * function genOr() in mcs51/gen.c
62 * was not prepeared for ifx==0
65 void void_tor1(char x)
67 char y = (identity(x) | 1) ? 42 : 43;
70 void void_tor0(char x)
72 char y = (identity(x) | 0) ? 42 : 43;
77 char y = (identity(x) | x) ? 42 : 43;
88 ASSERT(tor1(1) == 42);
89 ASSERT(tor1(0) == 42);
90 ASSERT(tor0(1) == 42);
91 ASSERT(tor0(0) == 43);
92 ASSERT(tand1(1) == 42);
93 ASSERT(tand1(0) == 43);
94 ASSERT(tand0(1) == 43);
95 ASSERT(tand0(0) == 43);