Remove x86 mathinline.h

System Internals / glibc - Joseph Myers [codesourcery.com] - 19 December 2018 22:55 EST

After previous cleanups, the only code in the x86 bits/mathinline.h that is relevant with current compilers is the inline of __ieee754_atan2l that is conditional on __LIBC_INTERNAL_MATH_INLINES (i.e. for when libm itself is being built).

This inline is something that does belong in glibc not GCC, since __ieee754_atan2l is a purely internal function name. This patch moves that inline to a new sysdeps/x86/fpu/math_private.h, removing the bits/mathinline.h header.

Note that previously the inline was only for non-SSE 32-bit x86. That condition does not make sense, however, for a long double function; if it's not inlined, exactly the same x87 instruction will end up getting used by the out-of-line function, for both 32-bit and 64-bit. So that condition is not retained in the new version.

Tested for x86_64 and x86. As expected, installed stripped shared libraries are unchanged for 32-bit x86, but installed stripped libm.so is changed for x86_64 because calls to __ieee754_atan2l start being inlined where previously they were out of line calls. (The same change to start inlining the function would presumably also apply for 32-bit built with -mfpmath=sse, but that's not a configuration I've tested.)

- sysdeps/x86/fpu/math_private.h: New file.
- sysdeps/x86/fpu/bits/mathinline.h: Remove.

da75c1b180 Remove x86 mathinline.h.
ChangeLog | 3 +
sysdeps/x86/fpu/bits/mathinline.h | 295 --------------------------------------
sysdeps/x86/fpu/math_private.h | 32 +++++
3 files changed, 35 insertions(+), 295 deletions(-)

Upstream: sourceware.org


  • Share