public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Over optimisation
@ 1999-09-23  7:26 Andrew Davies
  1999-09-23  7:43 ` Jeffrey A Law
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ messages in thread
From: Andrew Davies @ 1999-09-23  7:26 UTC (permalink / raw)
  To: help-gcc

Hi,
	I have a problem with the optimiser. When I compile the following test
loop:

do  {
    test = regbase->utx & 0x8000;
    }while(test == 0x0000);


It produces the following code:


send_byte:
	link.w %a6,#0
	move.w 16775430,%d0
	and.w #32768,%d0
	.even
.L9:
	tst.w %d0
	jbeq .L9

I think the optimiser is assuming the line inside the do while loop is
static and therefore removes it from the loop. As a result it gets stuck.
Anyone know how to solve this without turning the optimiser off? 

Thanks

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1999-10-31 13:57 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-23  7:26 Over optimisation Andrew Davies
1999-09-23  7:43 ` Jeffrey A Law
1999-09-30 23:56   ` Jeffrey A Law
1999-10-01  0:00   ` Jeffrey A Law
1999-09-23  8:13 ` Michel Decima
1999-09-30 23:56   ` Michel Decima
1999-10-01  0:00   ` Michel Decima
1999-09-30 23:56 ` Andrew Davies
1999-10-01  0:00 ` Andrew Davies
1999-10-03  9:55 ` Veksler Michael
1999-10-31 13:57   ` Veksler Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).