[PATCH 2/3] i386: Use generic fmod
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Mar 14 18:18:09 GMT 2024
The benchtest results shows a slight improvement:
* sysdeps/i386/fpu/e_fmod.S:
"fmod": {
"subnormals": {
"duration": 3.68855e+09,
"iterations": 2.12608e+08,
"max": 62.012,
"min": 16.798,
"mean": 17.349
},
"normal": {
"duration": 3.88459e+09,
"iterations": 7.168e+06,
"max": 2879.12,
"min": 16.909,
"mean": 541.934
},
"close-exponents": {
"duration": 3.692e+09,
"iterations": 1.96608e+08,
"max": 66.452,
"min": 16.835,
"mean": 18.7785
}
}
* generic
"fmod": {
"subnormals": {
"duration": 3.68645e+09,
"iterations": 2.2848e+08,
"max": 66.896,
"min": 15.91,
"mean": 16.1347
},
"normal": {
"duration": 4.1455e+09,
"iterations": 8.192e+06,
"max": 3376.18,
"min": 15.873,
"mean": 506.043
},
"close-exponents": {
"duration": 3.70197e+09,
"iterations": 2.08896e+08,
"max": 69.597,
"min": 15.947,
"mean": 17.7216
}
}
---
sysdeps/i386/fpu/e_fmod.S | 18 ------------------
sysdeps/i386/fpu/w_fmod_compat.c | 15 ---------------
sysdeps/unix/sysv/linux/i386/libm.abilist | 1 +
3 files changed, 1 insertion(+), 33 deletions(-)
delete mode 100644 sysdeps/i386/fpu/e_fmod.S
delete mode 100644 sysdeps/i386/fpu/w_fmod_compat.c
diff --git a/sysdeps/i386/fpu/e_fmod.S b/sysdeps/i386/fpu/e_fmod.S
deleted file mode 100644
index 86ac1bcfaf..0000000000
--- a/sysdeps/i386/fpu/e_fmod.S
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Public domain.
- */
-
-#include <machine/asm.h>
-#include <libm-alias-finite.h>
-
-ENTRY(__ieee754_fmod)
- fldl 12(%esp)
- fldl 4(%esp)
-1: fprem
- fstsw %ax
- sahf
- jp 1b
- fstp %st(1)
- ret
-END (__ieee754_fmod)
-libm_alias_finite (__ieee754_fmod, __fmod)
diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c
deleted file mode 100644
index 528bfc2a13..0000000000
--- a/sysdeps/i386/fpu/w_fmod_compat.c
+++ /dev/null
@@ -1,15 +0,0 @@
-/* i386 provides an optimized __ieee752_fmod. */
-#include <math-svid-compat.h>
-#ifdef SHARED
-# undef SHLIB_COMPAT
-# define SHLIB_COMPAT(a, b, c) 1
-# undef LIBM_SVID_COMPAT
-# define LIBM_SVID_COMPAT 1
-# undef compat_symbol
-# define compat_symbol(a, b, c, d)
-# include <math/w_fmod_compat.c>
-libm_alias_double (__fmod_compat, fmod)
-#else
-#include <math-type-macros-double.h>
-#include <w_fmod_template.c>
-#endif
diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist
index 5d89aaa08e..dccd7ccd79 100644
--- a/sysdeps/unix/sysv/linux/i386/libm.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libm.abilist
@@ -1188,3 +1188,4 @@ GLIBC_2.35 fsqrt F
GLIBC_2.35 fsqrtl F
GLIBC_2.35 hypot F
GLIBC_2.35 hypotf F
+GLIBC_2.38 fmod F
--
2.34.1
More information about the Libc-alpha
mailing list