🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #277

Re: gcc 2.2.2 optimizer bug/68k

#277
From: Ross Ridge
Date: Sat, 25 Jul 1992 21:02
29 lines
1308 bytes
asmith@synoptics.com (Andrew Smith) writes:
>Don't ask me why it still leaves the loop in the program - that is the
>real bug!

It can't get rid of the loop, if "*addr & 32" is true then it should go
into a infinite loop.  You could optimize the loop by branching to
after the test statement instead of before, but what's the point of
doing nothing faster?

>> C code: 
>>         while (!(*addr & 32));
>> --------------------------------- 
>> 68k assembler code with optimization (-O) 
>>  
>>         movel _addr,a0
>>         moveb a0@(1),d0
>>         andb #32,d0
>> L97:
>>         tstb d0
>>         jeq L97
>>         clrl d0

							Ross Ridge

-- 
Ross Ridge - The Great HTMU					     l/	 //
								    [OO][oo]
ross@zooid.guild.org						    /()\/()/
uunet.ca!zooid!ross						     db	 //
Technical Details
Message-ID: <1992Jul25.210227.26399@zooid.guild.org>
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!zooid.guild.ORG!ross
References: <9207202049.AA09471@zaphod.synoptics.com>

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!zooid.guild.ORG!ross
From: ross@zooid.guild.ORG (Ross Ridge)
Subject: Re:  gcc 2.2.2 optimizer bug/68k
Message-ID: <1992Jul25.210227.26399@zooid.guild.org>
Sender: gnulists@ai.mit.edu
Organization: ZOOiD BBS
References: <9207202049.AA09471@zaphod.synoptics.com>
Distribution: gnu
Date: Sat, 25 Jul 1992 21:02:27 GMT
Approved: bug-gcc@prep.ai.mit.edu
Lines: 30