NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/50940: cc -ffast-math fails to disable denormals on amd64

On Fri, Mar 11, 2016 at 02:45:00PM +0000, Andreas Gustafsson wrote:
> When the -ffast-math option is enabled, gcc generates x86_64 floating
> point code that assumes that the FTZ (Flush To Zero) and DAZ
> (Denormals Are Zero) bits in the MXCSR register are set.

That's not really true. The assumption with -ffast-math is that
denormals and infinites don't happen at all. Whether the CPU generates
them or not is a secondary question -- at that point you are already in
Undefined Behavior land for this mode.


Home | Main Index | Thread Index | Old Index