]> git.ipfire.org Git - thirdparty/glibc.git/commit - math/w_fmodf_compat.c
math: Remove the error handling wrapper from fmod and fmodf
authorAdhemerval Zanella Netto <adhemerval.zanella@linaro.org>
Mon, 20 Mar 2023 16:01:18 +0000 (13:01 -0300)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Mon, 3 Apr 2023 19:45:27 +0000 (16:45 -0300)
commit16439f419b270184ec501c531bf20d83b6745fb0
treee4f3223ddea72c871c2177c5257243c4c3df25ec
parentcf9cf33199fdd6550920ad43f19ad8b2435fc0c6
math: Remove the error handling wrapper from fmod and fmodf

The error handling is moved to sysdeps/ieee754 version with no SVID
support.  The compatibility symbol versions still use the wrapper
with SVID error handling around the new code.  There is no new symbol
version nor compatibility code on !LIBM_SVID_COMPAT targets
(e.g. riscv).

The ia64 is unchanged, since it still uses the arch specific
__libm_error_region on its implementation.  For both i686 and m68k,
which provive arch specific implementation, wrappers are added so
no new symbol are added (which would require to change the
implementations).

It shows an small improvement, the results for fmod:

  Architecture     | Input           | master   | patch
  -----------------|-----------------|----------|--------
  x86_64 (Ryzen 9) | subnormals      | 12.5049  | 9.40992
  x86_64 (Ryzen 9) | normal          | 296.939  | 296.738
  x86_64 (Ryzen 9) | close-exponents | 16.0244  | 13.119
  aarch64 (N1)     | subnormal       | 6.81778  | 4.33313
  aarch64 (N1)     | normal          | 155.620  | 152.915
  aarch64 (N1)     | close-exponents | 8.21306  | 5.76138
  armhf (N1)       | subnormal       | 15.1083  | 14.5746
  armhf (N1)       | normal          | 244.833  | 241.738
  armhf (N1)       | close-exponents | 21.8182  | 22.457

Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu.
Reviewed-by: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
38 files changed:
math/Versions
math/w_fmod_compat.c
math/w_fmodf_compat.c
sysdeps/i386/fpu/w_fmod_compat.c [new file with mode: 0644]
sysdeps/i386/fpu/w_fmodf_compat.c [new file with mode: 0644]
sysdeps/ieee754/dbl-64/e_fmod.c
sysdeps/ieee754/dbl-64/math_config.h
sysdeps/ieee754/dbl-64/math_err.c
sysdeps/ieee754/dbl-64/w_fmod.c [new file with mode: 0644]
sysdeps/ieee754/flt-32/e_fmodf.c
sysdeps/ieee754/flt-32/math_config.h
sysdeps/ieee754/flt-32/math_errf.c
sysdeps/ieee754/flt-32/w_fmodf.c [new file with mode: 0644]
sysdeps/m68k/m680x0/fpu/w_fmod_compat.c [new file with mode: 0644]
sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c [new file with mode: 0644]
sysdeps/unix/sysv/linux/aarch64/libm.abilist
sysdeps/unix/sysv/linux/alpha/libm.abilist
sysdeps/unix/sysv/linux/arm/be/libm.abilist
sysdeps/unix/sysv/linux/arm/le/libm.abilist
sysdeps/unix/sysv/linux/hppa/libm.abilist
sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist
sysdeps/unix/sysv/linux/microblaze/be/libm.abilist
sysdeps/unix/sysv/linux/microblaze/le/libm.abilist
sysdeps/unix/sysv/linux/mips/mips32/libm.abilist
sysdeps/unix/sysv/linux/mips/mips64/libm.abilist
sysdeps/unix/sysv/linux/nios2/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist
sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist
sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist
sysdeps/unix/sysv/linux/sh/be/libm.abilist
sysdeps/unix/sysv/linux/sh/le/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist
sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist
sysdeps/unix/sysv/linux/x86_64/64/libm.abilist
sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist