From: Sandeep D. <sa...@wi...> - 2001-11-10 16:31:15
|
Try building the compiler with -O0 instead of -O2 .. yesterday I ran into a GCC bug ... Sandeep > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Johan Knol > Sent: Saturday, November 10, 2001 8:06 AM > To: Scott Dattalo; sdc...@li... > Subject: Re: [sdcc-devel] bit is now cast to int > > > Strange, if I compile this from within gdb I nicely get: > > ; genOr > mov c,_bit1 > orl c,_bit2 > mov _bit0,c > ret > > >From the shell I get: > > ; genCast > mov c,_bit1 > mov r2,c > ; genCast > mov c,_bit2 > mov r3,c > ; genOr > mov a,r3 > orl ar2,a > ; genCast > mov a,r2 > clr c > jz 00103$ > cpl c > mov _bit0,c > ret > > Which the assembler doesn't like (mov r2,c). > > ----- Original Message ----- > From: Scott Dattalo <sc...@da...> > To: <sdc...@li...> > Sent: Saturday, November 10, 2001 3:30 PM > Subject: [sdcc-devel] bit is now cast to int > > > > > > After sync'ing up to CVS yesterday (~ 12 hours before this > message) I > > noticed that bit types are now getting cast into bytes. > Anyone have an > > explaination? > > > > This snippet used to generate nice code. Now it looks pretty bad. > > > > > > bit bit0 = 0; > > bit bit1 = 0; > > bit bit2 = 0; > > > > > > void or_bits2(void) > > { > > > > bit0 = bit1 | bit2; > > > > } > > > > > > (Incidently, it brought out yet another bug in the pic port...) > > > > Scott > > > > > > _______________________________________________ > > sdcc-devel mailing list > > sdc...@li... > > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > > > _______________________________________________ > sdcc-devel mailing list > sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-devel > > > |