From: Sandeep D. <sa...@dd...> - 2000-03-06 18:57:59
|
Hi Anton , This is fixed as well Sandeep > > 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... > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > http://lists.sourceforge.net/mailman/listinfo/sdcc-devel -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sandeep Dutta Phone: 650-356-5417 Diab-SDS Fax: 650-356-5490 323 Vintage Park Drive Email: sa...@dd... Foster City, CA 94404 URL: www.ddi.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |