[powerpc] fe{en,dis}ableexcept optimize bit translations
commitcd7ce12a027656ad3cda774454088de5a2c7fbfa
authorPaul A. Clarke <pc@us.ibm.com>
Sat, 13 Jul 2019 01:13:58 +0000 (12 20:13 -0500)
committerPaul A. Clarke <pc@us.ibm.com>
Wed, 28 Aug 2019 18:49:19 +0000 (28 13:49 -0500)
treeae1686c96b9c3e627df3123eaa6f329db5a5b174
parent35ffd20dbd76d3cb6b478c7a69bb40d8c827ed81
[powerpc] fe{en,dis}ableexcept optimize bit translations

The exceptions passed to fe{en,dis}ableexcept() are defined in the ABI
as a bitmask, a combination of FE_INVALID, FE_OVERFLOW, etc.
Within the functions, these bits must be translated to/from the corresponding
enable bits in the Floating Point Status Control Register (FPSCR).
This translation is currently done bit-by-bit.  The compiler generates
a series of conditional bit operations.  Nicely, the "FE" exception
bits are all a uniform offset from the FPSCR enable bits, so the bit-by-bit
operation can instead be performed by a shift with appropriate masking.
ChangeLog
sysdeps/powerpc/fpu/fedisblxcpt.c
sysdeps/powerpc/fpu/feenablxcpt.c
sysdeps/powerpc/fpu/fenv_libc.h