Page MenuHomeFreeBSD

AArch64: Don't set flush-subnormals-to-zero flag on startup

Authored by arichardson on Feb 26 2021, 12:43 PM.



This flag has been set on startup since 65618fdda0f272a823e6701966421bdca0efa301.
However, This causes some of the math-related tests to fail as they report
zero instead of a tiny number. This fixes at least
/usr/tests/lib/msun/ldexp_test and possibly others.
Additionally, setting this flag prevents printf() from printing subnormal
numbers in decimal form.
See also

PR: 253847

Diff Detail

rG FreeBSD src repository
Lint Not Applicable
Tests Not Applicable

Event Timeline


I just re-ran the lib/msun tests with this set to zero and this results in one fewer failure. Why is this non-default flag being set?

My original idea was to do as much as possible for armv7. Primarily because it has been working on this platform for a long time. My bad is that I didn't remember that flush-to-zero mode was chosen because the little version of armv7 VFP may need software emulation for rounding to denormal values, so we chose the IEEE 754 incompatible mode.


Bad is that I'm unable to determine which value of DN should be compatible with IEEE 754 standard. By my reading, IEEE754 allows both variants.

This revision is now accepted and ready to land.Mar 1 2021, 12:13 PM