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



The following reply was made to PR toolchain/50940; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: toolchain-manager%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
	netbsd-bugs%netbsd.org@localhost
Subject: Re: toolchain/50940: cc -ffast-math fails to disable denormals on
 amd64
Date: Fri, 11 Mar 2016 16:28:38 +0100

 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.
 
 Joerg
 


Home | Main Index | Thread Index | Old Index