HomeFreeBSD

Save all fpcr/fpsr bits in the AArch64 fenv_t

Description

Save all fpcr/fpsr bits in the AArch64 fenv_t

The existing code masked off all bits that it didn't know about. To be
future-proof, we should save and restore the entire fpcr/fpsr registers.
Additionally, the existing fesetenv() was incorrectly setting the rounding
mode in fpsr instead of fpcr.

This patch stores fpcr in the high 32 bits of fenv_t and fpsr in the low
bits instead of trying to interleave them in a single 32-bit field.

Technically, this is an ABI break if you re-compile parts of your code or
pass a fenv_t between DSOs that were compiled with different versions
of fenv.h. However, I believe we should fix this since the existing code
was broken and passing fenv_t across DSOs should rarely happen.

Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D29160

Details

Provenance
arichardsonAuthored on Mar 12 2021, 5:01 PM
Reviewer
andrew
Differential Revision
D29160: Save all fpcr/fpsr bits in the AArch64 fenv_t
Parents
rGb8e12d2d5c76: Improve the wording for showing the brightness level
Branches
Unknown
Tags
Unknown