http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48295
--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2011-03-28 10:50:44 UTC --- On Mon, 28 Mar 2011, rguenth at gcc dot gnu.org wrote: > Btw, your testcase would be kindof invalid as you are not using the > documented standard way of accessing fenv but using inline-asm (and > we don't have a special clobber that tells GCC you touched the FP > control word). You mark the asm as reading and clobbering fpcr - that register name already exists in GCC, and it's a bug that glibc's fpu_control.h doesn't use it, though I suppose you'd need to add the "mxcsr" name as well. When -frounding-math is actually properly implemented it ought to be taught about target-specific registers representing rounding modes (and likewise exception status) so it knows how asms interact with the floating-point state. (Non-const, non-pure function calls will also need to be presumed to interact with the state in unknown ways since they may end up calling fenv.h functions.)