Sourceware Bugzilla – Bug 10064
ARM fesetround doesn't work as expected with VFP present but unused
Last modified: 2012-02-19 01:30:57 UTC
When using software floating point, fesetround should return error on all but
the default rounding mode. When VFP hardware happens to be present, fesetround
will program the VFP to the rounding mode, and not return error. Unfortunately,
software floating point rounding mode is not changed. This causes programs which
would otherwise detect the failure to change rounding mode to fail later in
How to fix this? Is there a way to detect if an application is not using the
VFP? I see some ELF tags that might be relevant. Otherwise, could glibc
implement the aeabi floating point helper functions instead of gcc? Then, it
could choose to use the VFP when present in hardware, or use the assembly
version when there is no VFP.
Discussion at <http://sourceware.org/ml/libc-ports/2009-04/subjects.html#00019>; I don't think there's any ideal solution for all cases, and both GCC and glibc will probably be involved in any improvement here.
Suspending, given the likely tricky interactions with other toolchain components.