Date: Sun, 15 Jun 1997 14:33:39 +0200 From: Tommy Hallgren <md6tommy@mdstud.chalmers.se> To: "Serge A. Babkin" <babkin@hq.icb.chel.su> Cc: hackers@freebsd.org Subject: Re: C optimizer bug ? Message-ID: <33A3E123.41C67EA6@mdstud.chalmers.se>
next in thread | raw e-mail | index | archive | help
Hi Serge!
Sometimes when you turn on optimizations, the compiler decides to cache
some data into registers. Loops like
while(!flag) {}
will be
mov eax, flag
label: tst eax
branch label
instead of
label: mov eax, flag
tst eax
branch label
Use the keyword "volatile" to force the loading the contents every time.
Maybe this could be your problem?
Mvh: Tommy(md6tommy@mdstud.chalmers.se)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?33A3E123.41C67EA6>
