From: <MSoegtrop@Michael-Soegtrop.de> - 2002-05-29 14:53:35
|
Dear Mathias, i had a similar effect with 2.3.1. It worked to switch loop invariant optimization off (option -=96noinvariant). I have prepared a bug report for this last week, where you can clearly see in the assemley dump that a register where a loop invariant expression is stored is overwritten somewhere. Sorry for not sending this in yet, but i moved with my lab and don't have my network up there yet. If this bug is not yet known, i promise to send the bug report asap. Best regards, Michael > -----Original Message----- > From: sdc...@li... > [mailto:sdc...@li...]On Behalf Of Matthias > Wei=DFer > Sent: Wednesday, May 29, 2002 4:30 PM > To: Bernhard Held > Cc: sdc...@so... > Subject: Re: [Sdcc-user] calculation with long variables > > > > > xdata unsigned char idebuf[8192]; > > > unsigned char j =3D 0; > > > ... > > > uc_strcpy(&idebuf[(i-32+1)-j*32],&lfn[j*13],5); > > > uc_strcpy(&idebuf[(i-32+14)-j*32],&lfn[(j*13)+5],6); > > > uc_strcpy(&idebuf[(i-32+28)-j*32],&lfn[(j*13)+11],2); > > > > > > if ((idebuf[(i-32-j*32)] & 0x40) =3D=3D 0x40) break; > > > > j*32 is calculated as 8x8 bit multiplication and will overflow very > quickly. > > You will only get correct results in the range 0 <=3D j <=3D 7. Fix: > > ... - (unsigned) j * 32] ... > ^^^^^^ > i expect this should be a (unsigned int)? > > > Tell me, if this doesn't help. > > The Problem is that the calcultion fails even when j =3D 1 > > > Matthias Wei=DFer > mat...@ma... > http://www.matwei.de > > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > Sdcc-user mailing list > Sdc...@li... > https://lists.sourceforge.net/lists/listinfo/sdcc-user |