Re: cvs commit: src/lib/msun/alpha fenv.h src/lib/msun/amd64 fenv.h src/lib/msun/arm fenv.h src/lib/msun/i387 fenv.h src/lib/msun/ia64 fenv.h src/lib/msun/powerpc fenv.h src/lib/msun/sparc64 fenv.h

From: David Schultz <das_at_FreeBSD.ORG>
Date: Fri, 14 Jan 2005 16:37:55 -0500
On Fri, Jan 14, 2005, David Schultz wrote:
> das         2005-01-14 07:09:23 UTC
>   FreeBSD src repository
>   Modified files:
>     lib/msun/alpha       fenv.h 
>     lib/msun/amd64       fenv.h 
>     lib/msun/arm         fenv.h 
>     lib/msun/i387        fenv.h 
>     lib/msun/ia64        fenv.h 
>     lib/msun/powerpc     fenv.h 
>     lib/msun/sparc64     fenv.h 
>   Log:
>   Mark all inline asms that read the floating-point control or status
>   registers as volatile.  Instructions that *wrote* to FP state were
>   already marked volatile, but apparently gcc has license to move
>   non-volatile asms past volatile asms.  This broke amd64's feupdateenv
>   at -O2 due to a WAR conflict between fnstsw and fldenv there.

Bah.  I knew I wasn't crazy when I wrote the original code.  From
the gcc documentation:

	In addition, GCC will not reschedule instructions across a
	volatile `asm' instruction.

The fact that I saw otherwise is either a compiler bug or a
documentation bug and has apparently been reported previously.
I have filed a test case as a followup to gcc bug 17884:
Received on Fri Jan 14 2005 - 21:37:56 UTC