]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Work around a gcc bug. This fixes feholdexcept() et al. at -O1.
authordas <das@FreeBSD.org>
Sat, 5 Mar 2005 20:34:45 +0000 (20:34 +0000)
committerdas <das@FreeBSD.org>
Sat, 5 Mar 2005 20:34:45 +0000 (20:34 +0000)
commit062f662fe278c9446b719d13d73d55acefeb1ff3
tree8c2afc0654fec0a65cb52419b675e5d0aac281d3
parent9f6d0603853138731f15e3874369b807e66f2f16
Work around a gcc bug.  This fixes feholdexcept() et al. at -O1.
Symptoms of the problem included assembler warnings and
nondeterministic runtime behavior when a fe*() call that affects the
fpsr is closely followed by a float point op.

The bug (at least, I think it's a bug) is that gcc does not insert a
break between a volatile asm and a dependent instruction if the
volatile asm came from an inlined function.  Volatile asms seem to be
fine in other circumstances, even without -mvolatile-asm-stop, so
perhaps the compiler adds the stop bits before inlining takes place.
The problem does not occur at -O0 because inlining is disabled, and it
doesn't happen at -O2 because -fschedule-insns2 knows better.
lib/msun/ia64/fenv.h