From: Anton V. <va...@is...> - 2000-03-06 13:23:18
|
Hi all! Here is another troublesome program (checked with CVS snapshot of march 6 & 2.1.9Ga): char f(unsigned char c) { return (~(1 << c)); } void main() { f(3); } sdcc generates the following: _f: ar2 = 0x02 ar3 = 0x03 ar4 = 0x04 ar5 = 0x05 ar6 = 0x06 ar7 = 0x07 ar0 = 0x00 ar1 = 0x01 ; shl_bug.c 2 mov r2,dpl mov dpl,#0xfe 00101$: I.e. no shift in this case - probably this is a bug in optimization. Best regards, Anton Voloshin mailto:va...@is... |