diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-02-01 20:52:59 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-02-01 20:52:59 +0000 |
commit | d23a4962bb35a38b86bccf9ab1d426e2531c250d (patch) | |
tree | 65dc2aa9d920725eda2a7cb18527fdeeaaff6aaa /ChangeLog | |
parent | 5f167950dffde066dea973e90456fe95350e2e68 (diff) | |
download | glibc-d23a4962bb35a38b86bccf9ab1d426e2531c250d.tar.gz |
Move some fenv.h override macros to generic math_private.h.
Various configurations lacking support for floating-point exceptions
and rounding modes have a math_private.h that overrides certain
functions and macros, internal and external, to avoid references to
FE_* constants that are undefined in those configurations. For
example, there are unconditional feraiseexcept (FE_INVALID) calls in
generic libm code, and these macro definitions duly define
feraiseexcept to ignore its argument to avoid an error from FE_INVALID
being undefined.
In fact it is easy to tell in an architecture-independent way whether
this is needed, by testing whether FE_ALL_EXCEPT == 0. Thus, this
patch puts such a test, and feraiseexcept and __feraiseexcept macros,
in the generic math_private.h, so reducing the duplication between
architecture versions of this header. The feclearexcept macro present
in several versions of this header, and fetestexcept in the tile
version, are not needed; they would have been needed before there were
proper soft-fp fma implementations (when generic versions, that depend
on FE_TOWARDZERO and FE_INEXACT, were being used for configurations
not supporting those features), but aren't needed any more, and so are
removed.
The tile version of this header has several inline functions for
fenv.h functions to optimize calls to them away in such configurations
where they do nothing useful, and all these header versions also have
definitions of some of the libc_fe* internal macros. I intend to make
those generic in subsequent patches.
Tested with build-many-glibcs.py that installed stripped shared
libraries are unchanged by this patch.
* sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0]
(feraiseexcept): New macro.
[FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise.
* sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept):
Remove macro.
(__feraiseexcept): Likewise.
(feclearexcept): Likewise.
* sysdeps/microblaze/math_private.h (feraiseexcept): Likewise.
(__feraiseexcept): Likewise.
(feclearexcept): Likewise.
* sysdeps/nios2/math_private.h (feraiseexcept): Likewise.
(__feraiseexcept): Likewise.
(feclearexcept): Likewise.
* sysdeps/tile/math_private.h (feraiseexcept): Likewise.
(__feraiseexcept): Likewise.
(feclearexcept): Likewise.
(fetestexcept): Likewise.
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1,5 +1,23 @@ 2018-02-01 Joseph Myers <joseph@codesourcery.com> + * sysdeps/generic/math_private.h [FE_ALL_EXCEPT == 0] + (feraiseexcept): New macro. + [FE_ALL_EXCEPT == 0] (__feraiseexcept): Likewise. + * sysdeps/m68k/coldfire/nofpu/math_private.h (feraiseexcept): + Remove macro. + (__feraiseexcept): Likewise. + (feclearexcept): Likewise. + * sysdeps/microblaze/math_private.h (feraiseexcept): Likewise. + (__feraiseexcept): Likewise. + (feclearexcept): Likewise. + * sysdeps/nios2/math_private.h (feraiseexcept): Likewise. + (__feraiseexcept): Likewise. + (feclearexcept): Likewise. + * sysdeps/tile/math_private.h (feraiseexcept): Likewise. + (__feraiseexcept): Likewise. + (feclearexcept): Likewise. + (fetestexcept): Likewise. + * sysdeps/m68k/coldfire/math-tests.h: New file. * sysdeps/m68k/fpu/bits/fenv.h: Move to .... |