[PATCH v3 06/19] math: Don't redirect inlined builtin math functions
H.J. Lu
hjl.tools@gmail.com
Fri Oct 31 23:31:39 GMT 2025
On Sat, Nov 1, 2025 at 4:03 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> When we want to inline builtin math functions, like truncf, for
>
> extern float truncf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
> extern float __truncf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
>
> float (truncf) (float) asm ("__truncf");
>
> compiler may redirect truncf calls to __truncf, instead of inlining it
> (for instance, clang). The USE_TRUNCF_BUILTIN is 1 to indicate that
> truncf should be inlined. In this case, we don't want the truncf
> redirection:
>
> 1. For each math function which may be inlined, we define
>
> #if USE_TRUNCF_BUILTIN
> # define NO_truncf_BUILTIN inline_truncf
> #else
> # define NO_truncf_BUILTIN truncf
> #endif
>
> in <math-use-builtins.h>.
>
> 2. Include <math-use-builtins.h> in include/math.h.
>
> 3. Change MATH_REDIRECT to
>
> #define MATH_REDIRECT(FUNC, PREFIX, ARGS) \
> float (NO_ ## FUNC ## f ## _BUILTIN) (ARGS (float)) \
> asm (PREFIX #FUNC "f");
>
> With this change If USE_TRUNCF_BUILTIN is 0, we get
>
> float (truncf) (float) asm ("__truncf");
> truncf will be redirected to __truncf.
>
> And for USE_TRUNCF_BUILTIN 1, we get:
>
> float (inline_truncf) (float) asm ("__truncf");
>
> In both cases either truncf will be inlined or the internal alias
> (__truncf) will be called.
>
> It is not required for all math-use-builtin symbol, only the one
> defined in math.h. It also allows to remove all the math-use-builtin
> inclusion, since it is now implicitly included by math.h.
>
> For MIPS, some math-use-builtin headers include sysdep.h and this
> in turn includes a lot of extra headers that do not allow ldbl-128
> code to override alias definition (math.h will include
> some stdlib.h definition). The math-use-builtin only requires
> the __mips_isa_rev, so move the defintion to sgidefs.h.
>
> Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
> Co-authored-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> include/math.h | 22 +-
> math/s_fmax_template.c | 1 -
> math/s_fmin_template.c | 2 -
> sysdeps/generic/math-use-builtins-copysign.h | 2 +
> sysdeps/generic/math-use-builtins.h | 196 ++++++++++++++++++
> sysdeps/ieee754/dbl-64/e_hypot.c | 1 -
> sysdeps/ieee754/dbl-64/e_sqrt.c | 1 -
> sysdeps/ieee754/dbl-64/s_ceil.c | 1 -
> sysdeps/ieee754/dbl-64/s_floor.c | 1 -
> sysdeps/ieee754/dbl-64/s_fma.c | 1 -
> sysdeps/ieee754/dbl-64/s_fmaf.c | 1 -
> sysdeps/ieee754/dbl-64/s_llrint.c | 1 -
> sysdeps/ieee754/dbl-64/s_llround.c | 1 -
> sysdeps/ieee754/dbl-64/s_logb.c | 2 -
> sysdeps/ieee754/dbl-64/s_lrint.c | 1 -
> sysdeps/ieee754/dbl-64/s_lround.c | 1 -
> sysdeps/ieee754/dbl-64/s_modf.c | 1 -
> sysdeps/ieee754/dbl-64/s_nearbyint.c | 1 -
> sysdeps/ieee754/dbl-64/s_rint.c | 1 -
> sysdeps/ieee754/dbl-64/s_round.c | 2 -
> sysdeps/ieee754/dbl-64/s_roundeven.c | 1 -
> sysdeps/ieee754/dbl-64/s_trunc.c | 2 -
> sysdeps/ieee754/float128/float128_private.h | 1 -
> sysdeps/ieee754/flt-32/e_sqrtf.c | 1 -
> sysdeps/ieee754/flt-32/s_ceilf.c | 1 -
> sysdeps/ieee754/flt-32/s_floorf.c | 1 -
> sysdeps/ieee754/flt-32/s_llrintf.c | 1 -
> sysdeps/ieee754/flt-32/s_llroundf.c | 1 -
> sysdeps/ieee754/flt-32/s_logbf.c | 1 -
> sysdeps/ieee754/flt-32/s_lrintf.c | 1 -
> sysdeps/ieee754/flt-32/s_lroundf.c | 1 -
> sysdeps/ieee754/flt-32/s_modff.c | 1 -
> sysdeps/ieee754/flt-32/s_nearbyintf.c | 1 -
> sysdeps/ieee754/flt-32/s_rintf.c | 1 -
> sysdeps/ieee754/flt-32/s_roundevenf.c | 1 -
> sysdeps/ieee754/flt-32/s_roundf.c | 1 -
> sysdeps/ieee754/flt-32/s_truncf.c | 1 -
> sysdeps/ieee754/ldbl-128/s_ceill.c | 1 -
> sysdeps/ieee754/ldbl-128/s_copysignl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_floorl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_fma.c | 1 -
> sysdeps/ieee754/ldbl-128/s_fmal.c | 1 -
> sysdeps/ieee754/ldbl-128/s_llrintl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_logbl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_lrintl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_nearbyintl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_rintl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_roundevenl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_roundl.c | 1 -
> sysdeps/ieee754/ldbl-128/s_truncl.c | 1 -
> sysdeps/ieee754/ldbl-128ibm/s_fabsl.c | 1 -
> sysdeps/ieee754/ldbl-96/s_fabsl.c | 1 -
> sysdeps/mips/fpu/math-use-builtins-fma.h | 2 +-
> sysdeps/mips/math-use-builtins-ffs.h | 2 +-
> sysdeps/mips/sgidefs.h | 3 +
> sysdeps/powerpc/fpu/e_sqrt.c | 1 -
> sysdeps/powerpc/fpu/e_sqrtf.c | 1 -
> sysdeps/unix/mips/sysdep.h | 3 -
> sysdeps/x86_64/fpu/multiarch/s_modf-avx.c | 4 -
> sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c | 4 -
> sysdeps/x86_64/fpu/multiarch/s_modff-avx.c | 4 -
> sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c | 4 -
> 62 files changed, 219 insertions(+), 82 deletions(-)
>
> diff --git a/include/math.h b/include/math.h
> index 9ba4708801e..12150e5d64d 100644
> --- a/include/math.h
> +++ b/include/math.h
> @@ -139,25 +139,35 @@ fabsf128 (_Float128 x)
> /* NB: Internal tests don't have access to internal symbols. */
> # if !IS_IN (testsuite_internal) \
> && !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
> +/* NO_MATH_REDIRECT must be defined in the source implementing function,
> + FUNC, if FUNC is implemented as an alias of __FUNC or vice versa to
> + avoid redirecting FUNC to __FUNC. */
> +# include <math-use-builtins.h>
> +/* NB: Do not redirect math builtin functions when they are inlined. */
> # ifndef NO_MATH_REDIRECT
> /* Declare some functions for use within GLIBC. Compilers typically
> inline those functions as a single instruction. Use an asm to
> avoid use of PLTs if it doesn't. */
> # define MATH_REDIRECT(FUNC, PREFIX, ARGS) \
> - float (FUNC ## f) (ARGS (float)) asm (PREFIX #FUNC "f"); \
> - double (FUNC) (ARGS (double)) asm (PREFIX #FUNC ); \
> + float (NO_ ## FUNC ## f ## _BUILTIN) (ARGS (float)) \
> + asm (PREFIX #FUNC "f"); \
> + double (NO_ ## FUNC ## _BUILTIN) (ARGS (double)) \
> + asm (PREFIX #FUNC ); \
> MATH_REDIRECT_LDBL (FUNC, PREFIX, ARGS) \
> MATH_REDIRECT_F128 (FUNC, PREFIX, ARGS)
> +
> # if defined __NO_LONG_DOUBLE_MATH \
> || __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
> # define MATH_REDIRECT_LDBL(FUNC, PREFIX, ARGS)
> # else
> -# define MATH_REDIRECT_LDBL(FUNC, PREFIX, ARGS) \
> - long double (FUNC ## l) (ARGS (long double)) asm (PREFIX #FUNC "l");
> +# define MATH_REDIRECT_LDBL(FUNC, PREFIX, ARGS) \
> + long double (NO_ ## FUNC ## l ## _BUILTIN) (ARGS (long double)) \
> + asm (PREFIX #FUNC "l");
> # endif
> # if __HAVE_DISTINCT_FLOAT128
> -# define MATH_REDIRECT_F128(FUNC, PREFIX, ARGS) \
> - _Float128 (FUNC ## f128) (ARGS (_Float128)) asm (PREFIX #FUNC "f128");
> +# define MATH_REDIRECT_F128(FUNC, PREFIX, ARGS) \
> + _Float128 (NO_ ## FUNC ## f128 ## _BUILTIN) (ARGS (_Float128)) \
> + asm (PREFIX #FUNC "f128");
> # else
> # define MATH_REDIRECT_F128(FUNC, PREFIX, ARGS)
> # endif
> diff --git a/math/s_fmax_template.c b/math/s_fmax_template.c
> index bdf71096afa..87e6ee67dfa 100644
> --- a/math/s_fmax_template.c
> +++ b/math/s_fmax_template.c
> @@ -17,7 +17,6 @@
> <https://www.gnu.org/licenses/>. */
>
> #include <math.h>
> -#include <math-use-builtins.h>
>
> FLOAT
> M_DECL_FUNC (__fmax) (FLOAT x, FLOAT y)
> diff --git a/math/s_fmin_template.c b/math/s_fmin_template.c
> index 99d25aa5b9b..9ff330969f0 100644
> --- a/math/s_fmin_template.c
> +++ b/math/s_fmin_template.c
> @@ -17,8 +17,6 @@
> <https://www.gnu.org/licenses/>. */
>
> #include <math.h>
> -#include <math-use-builtins.h>
> -
>
> FLOAT
> M_DECL_FUNC (__fmin) (FLOAT x, FLOAT y)
> diff --git a/sysdeps/generic/math-use-builtins-copysign.h b/sysdeps/generic/math-use-builtins-copysign.h
> index b774931f431..4bca2ee1b10 100644
> --- a/sysdeps/generic/math-use-builtins-copysign.h
> +++ b/sysdeps/generic/math-use-builtins-copysign.h
> @@ -1,4 +1,6 @@
> /* Generic implementations for float and double always use the builtin. */
> +#define USE_COPYSIGNF_BUILTIN 1
> +#define USE_COPYSIGN_BUILTIN 1
> #define USE_COPYSIGNL_BUILTIN 1
> #if __GNUC_PREREQ (7, 0)
> # define USE_COPYSIGNF128_BUILTIN 1
> diff --git a/sysdeps/generic/math-use-builtins.h b/sysdeps/generic/math-use-builtins.h
> index e069b161b18..13b037fb9e8 100644
> --- a/sysdeps/generic/math-use-builtins.h
> +++ b/sysdeps/generic/math-use-builtins.h
> @@ -44,4 +44,200 @@
> #include <math-use-builtins-lround.h>
> #include <math-use-builtins-llround.h>
>
> +
> +/* Disable internal alias optimizations done at include/math.h if the
> + compiler can expand the builtin for the symbol. Different than gcc, the
> + clang will always expand the alias before handling the builtin expansion,
> + which makes the builtin expansion ineffective. */
> +
> +#if USE_SQRT_BUILTIN
> +# define NO_sqrt_BUILTIN inline_sqrt
> +#else
> +# define NO_sqrt_BUILTIN sqrt
> +#endif
> +#if USE_SQRTF_BUILTIN
> +# define NO_sqrtf_BUILTIN inline_sqrtf
> +#else
> +# define NO_sqrtf_BUILTIN sqrtf
> +#endif
> +#if USE_SQRTL_BUILTIN
> +# define NO_sqrtl_BUILTIN inline_sqrtl
> +#else
> +# define NO_sqrtl_BUILTIN sqrtl
> +#endif
> +#if USE_SQRTF128_BUILTIN
> +# define NO_sqrtf128_BUILTIN inline_sqrtf128
> +#else
> +# define NO_sqrtf128_BUILTIN sqrtf128
> +#endif
> +
> +
> +#if USE_CEIL_BUILTIN
> +# define NO_ceil_BUILTIN inline_ceil
> +#else
> +# define NO_ceil_BUILTIN ceil
> +#endif
> +#if USE_CEILF_BUILTIN
> +# define NO_ceilf_BUILTIN inline_ceilf
> +#else
> +# define NO_ceilf_BUILTIN ceilf
> +#endif
> +#if USE_CEILL_BUILTIN
> +# define NO_ceill_BUILTIN inline_ceill
> +#else
> +# define NO_ceill_BUILTIN ceill
> +#endif
> +#if USE_CEILF128_BUILTIN
> +# define NO_ceilf128_BUILTIN inline_ceilf128
> +#else
> +# define NO_ceilf128_BUILTIN ceilf128
> +#endif
> +
> +#if USE_FLOOR_BUILTIN
> +# define NO_floor_BUILTIN inline_floor
> +#else
> +# define NO_floor_BUILTIN floor
> +#endif
> +#if USE_FLOORF_BUILTIN
> +# define NO_floorf_BUILTIN inline_floorf
> +#else
> +# define NO_floorf_BUILTIN floorf
> +#endif
> +#if USE_FLOORL_BUILTIN
> +# define NO_floorl_BUILTIN inline_floorl
> +#else
> +# define NO_floorl_BUILTIN floorl
> +#endif
> +#if USE_FLOORF128_BUILTIN
> +# define NO_floorf128_BUILTIN inline_floorf128
> +#else
> +# define NO_floorf128_BUILTIN floorf128
> +#endif
> +
> +#if USE_ROUNDEVEN_BUILTIN
> +# define NO_roundeven_BUILTIN inline_roundeven
> +#else
> +# define NO_roundeven_BUILTIN roundeven
> +#endif
> +#if USE_ROUNDEVENF_BUILTIN
> +# define NO_roundevenf_BUILTIN inline_roundevenf
> +#else
> +# define NO_roundevenf_BUILTIN roundevenf
> +#endif
> +#if USE_ROUNDEVENL_BUILTIN
> +# define NO_roundevenl_BUILTIN inline_roundevenl
> +#else
> +# define NO_roundevenl_BUILTIN roundevenl
> +#endif
> +#if USE_ROUNDEVENF128_BUILTIN
> +# define NO_roundevenf128_BUILTIN inline_roundevenf128
> +#else
> +# define NO_roundevenf128_BUILTIN roundevenf128
> +#endif
> +
> +#if USE_RINT_BUILTIN
> +# define NO_rint_BUILTIN inline_rint
> +#else
> +# define NO_rint_BUILTIN rint
> +#endif
> +#if USE_RINTF_BUILTIN
> +# define NO_rintf_BUILTIN inline_rintf
> +#else
> +# define NO_rintf_BUILTIN rintf
> +#endif
> +#if USE_RINTL_BUILTIN
> +# define NO_rintl_BUILTIN inline_rintl
> +#else
> +# define NO_rintl_BUILTIN rintl
> +#endif
> +#if USE_RINTF128_BUILTIN
> +# define NO_rintf128_BUILTIN inline_rintf128
> +#else
> +# define NO_rintf128_BUILTIN rintf128
> +#endif
> +
> +#if USE_TRUNC_BUILTIN
> +# define NO_trunc_BUILTIN inline_trunc
> +#else
> +# define NO_trunc_BUILTIN trunc
> +#endif
> +#if USE_TRUNCF_BUILTIN
> +# define NO_truncf_BUILTIN inline_truncf
> +#else
> +# define NO_truncf_BUILTIN truncf
> +#endif
> +#if USE_TRUNCL_BUILTIN
> +# define NO_truncl_BUILTIN inline_truncl
> +#else
> +# define NO_truncl_BUILTIN truncl
> +#endif
> +#if USE_TRUNCF128_BUILTIN
> +# define NO_truncf128_BUILTIN inline_truncf128
> +#else
> +# define NO_truncf128_BUILTIN truncf128
> +#endif
> +
> +#if USE_ROUND_BUILTIN
> +# define NO_round_BUILTIN inline_round
> +#else
> +# define NO_round_BUILTIN round
> +#endif
> +#if USE_ROUNDF_BUILTIN
> +# define NO_roundf_BUILTIN inline_roundf
> +#else
> +# define NO_roundf_BUILTIN roundf
> +#endif
> +#if USE_ROUNDL_BUILTIN
> +# define NO_roundl_BUILTIN inline_roundl
> +#else
> +# define NO_roundl_BUILTIN roundl
> +#endif
> +#if USE_ROUNDF128_BUILTIN
> +# define NO_roundf128_BUILTIN inline_roundf128
> +#else
> +# define NO_roundf128_BUILTIN roundf128
> +#endif
> +
> +#if USE_COPYSIGN_BUILTIN
> +# define NO_copysign_BUILTIN inline_copysign
> +#else
> +# define NO_copysign_BUILTIN copysign
> +#endif
> +#if USE_COPYSIGNF_BUILTIN
> +# define NO_copysignf_BUILTIN inline_copysignf
> +#else
> +# define NO_copysignf_BUILTIN copysignf
> +#endif
> +#if USE_COPYSIGNL_BUILTIN
> +# define NO_copysignl_BUILTIN inline_copysignl
> +#else
> +# define NO_copysignl_BUILTIN copysignl
> +#endif
> +#if USE_COPYSIGNF128_BUILTIN
> +# define NO_copysignf128_BUILTIN inline_copysignf128
> +#else
> +# define NO_copysignf128_BUILTIN copysignf128
> +#endif
> +
> +#if USE_FMA_BUILTIN
> +# define NO_fma_BUILTIN inline_fma
> +#else
> +# define NO_fma_BUILTIN fma
> +#endif
> +#if USE_FMAF_BUILTIN
> +# define NO_fmaf_BUILTIN inline_fmaf
> +#else
> +# define NO_fmaf_BUILTIN fmaf
> +#endif
> +#if USE_FMAL_BUILTIN
> +# define NO_fmal_BUILTIN inline_fmal
> +#else
> +# define NO_fmal_BUILTIN fmal
> +#endif
> +#if USE_FMAF128_BUILTIN
> +# define NO_fmaf128_BUILTIN inline_fmaf128
> +#else
> +# define NO_fmaf128_BUILTIN fmaf128
> +#endif
> +
> #endif /* MATH_USE_BUILTINS_H */
> diff --git a/sysdeps/ieee754/dbl-64/e_hypot.c b/sysdeps/ieee754/dbl-64/e_hypot.c
> index 29555927edf..799ccbd08ea 100644
> --- a/sysdeps/ieee754/dbl-64/e_hypot.c
> +++ b/sysdeps/ieee754/dbl-64/e_hypot.c
> @@ -39,7 +39,6 @@
> #include <math_private.h>
> #include <math-underflow.h>
> #include <math-narrow-eval.h>
> -#include <math-use-builtins.h>
> #include <math-svid-compat.h>
> #include <libm-alias-finite.h>
> #include <libm-alias-double.h>
> diff --git a/sysdeps/ieee754/dbl-64/e_sqrt.c b/sysdeps/ieee754/dbl-64/e_sqrt.c
> index c01f0248c37..95956e44add 100644
> --- a/sysdeps/ieee754/dbl-64/e_sqrt.c
> +++ b/sysdeps/ieee754/dbl-64/e_sqrt.c
> @@ -40,7 +40,6 @@
> #include <math_private.h>
> #include <fenv_private.h>
> #include <libm-alias-finite.h>
> -#include <math-use-builtins.h>
>
> /*********************************************************************/
> /* An ultimate sqrt routine. Given an IEEE double machine number x */
> diff --git a/sysdeps/ieee754/dbl-64/s_ceil.c b/sysdeps/ieee754/dbl-64/s_ceil.c
> index 37382113607..c401e4c0bf6 100644
> --- a/sysdeps/ieee754/dbl-64/s_ceil.c
> +++ b/sysdeps/ieee754/dbl-64/s_ceil.c
> @@ -21,7 +21,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-double.h>
> -#include <math-use-builtins.h>
>
> double
> __ceil (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_floor.c b/sysdeps/ieee754/dbl-64/s_floor.c
> index 72c426ee59d..78ffb51e492 100644
> --- a/sysdeps/ieee754/dbl-64/s_floor.c
> +++ b/sysdeps/ieee754/dbl-64/s_floor.c
> @@ -34,7 +34,6 @@
> #include <math_private.h>
> #include <stdint.h>
> #include <libm-alias-double.h>
> -#include <math-use-builtins.h>
>
> /*
> * floor(x)
> diff --git a/sysdeps/ieee754/dbl-64/s_fma.c b/sysdeps/ieee754/dbl-64/s_fma.c
> index d157e8b472a..c7ff3cf447f 100644
> --- a/sysdeps/ieee754/dbl-64/s_fma.c
> +++ b/sysdeps/ieee754/dbl-64/s_fma.c
> @@ -30,7 +30,6 @@
> #include <libm-alias-double.h>
> #include <math-narrow-alias.h>
> #include <tininess.h>
> -#include <math-use-builtins.h>
>
> /* This implementation uses rounding to odd to avoid problems with
> double rounding. See a paper by Boldo and Melquiond:
> diff --git a/sysdeps/ieee754/dbl-64/s_fmaf.c b/sysdeps/ieee754/dbl-64/s_fmaf.c
> index 7bf9941dd88..26ced154657 100644
> --- a/sysdeps/ieee754/dbl-64/s_fmaf.c
> +++ b/sysdeps/ieee754/dbl-64/s_fmaf.c
> @@ -23,7 +23,6 @@
> #include <math-barriers.h>
> #include <fenv_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
> /* This implementation relies on double being more than twice as
> precise as float and uses rounding to odd in order to avoid problems
> diff --git a/sysdeps/ieee754/dbl-64/s_llrint.c b/sysdeps/ieee754/dbl-64/s_llrint.c
> index ec2643dcfec..0745a75666e 100644
> --- a/sysdeps/ieee754/dbl-64/s_llrint.c
> +++ b/sysdeps/ieee754/dbl-64/s_llrint.c
> @@ -25,7 +25,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long long int
> diff --git a/sysdeps/ieee754/dbl-64/s_llround.c b/sysdeps/ieee754/dbl-64/s_llround.c
> index e86d3dcb677..2339b92a167 100644
> --- a/sysdeps/ieee754/dbl-64/s_llround.c
> +++ b/sysdeps/ieee754/dbl-64/s_llround.c
> @@ -27,7 +27,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
> long long int
> __llround (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_logb.c b/sysdeps/ieee754/dbl-64/s_logb.c
> index 64749bc4996..cc6daf53aa4 100644
> --- a/sysdeps/ieee754/dbl-64/s_logb.c
> +++ b/sysdeps/ieee754/dbl-64/s_logb.c
> @@ -17,11 +17,9 @@
> <https://www.gnu.org/licenses/>. */
>
> #include <math.h>
> -
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <fix-int-fp-convert-zero.h>
> -#include <math-use-builtins.h>
>
> double
> __logb (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_lrint.c b/sysdeps/ieee754/dbl-64/s_lrint.c
> index 980959292e6..e4f034283e5 100644
> --- a/sysdeps/ieee754/dbl-64/s_lrint.c
> +++ b/sysdeps/ieee754/dbl-64/s_lrint.c
> @@ -25,7 +25,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long int
> diff --git a/sysdeps/ieee754/dbl-64/s_lround.c b/sysdeps/ieee754/dbl-64/s_lround.c
> index e92fa5ceedd..c7abd1410b9 100644
> --- a/sysdeps/ieee754/dbl-64/s_lround.c
> +++ b/sysdeps/ieee754/dbl-64/s_lround.c
> @@ -23,7 +23,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
> /* For LP64, lround is an alias for llround. */
> #ifndef _LP64
> diff --git a/sysdeps/ieee754/dbl-64/s_modf.c b/sysdeps/ieee754/dbl-64/s_modf.c
> index 90cd8e8c3ef..77e0226be93 100644
> --- a/sysdeps/ieee754/dbl-64/s_modf.c
> +++ b/sysdeps/ieee754/dbl-64/s_modf.c
> @@ -19,7 +19,6 @@
> #include <math.h>
> #include <libm-alias-double.h>
> #include "math_config.h"
> -#include <math-use-builtins-trunc.h>
>
> double
> __modf (double x, double *iptr)
> diff --git a/sysdeps/ieee754/dbl-64/s_nearbyint.c b/sysdeps/ieee754/dbl-64/s_nearbyint.c
> index 606002d6808..b2a6a81517d 100644
> --- a/sysdeps/ieee754/dbl-64/s_nearbyint.c
> +++ b/sysdeps/ieee754/dbl-64/s_nearbyint.c
> @@ -25,7 +25,6 @@
> #include <math_private.h>
> #include <fenv_private.h>
> #include <libm-alias-double.h>
> -#include <math-use-builtins.h>
>
> double
> __nearbyint (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_rint.c b/sysdeps/ieee754/dbl-64/s_rint.c
> index 8604733ef95..a9740af4448 100644
> --- a/sysdeps/ieee754/dbl-64/s_rint.c
> +++ b/sysdeps/ieee754/dbl-64/s_rint.c
> @@ -23,7 +23,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-double.h>
> -#include <math-use-builtins.h>
>
> double
> __rint (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_round.c b/sysdeps/ieee754/dbl-64/s_round.c
> index d3b8fcffc58..064773011ba 100644
> --- a/sysdeps/ieee754/dbl-64/s_round.c
> +++ b/sysdeps/ieee754/dbl-64/s_round.c
> @@ -22,8 +22,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <stdint.h>
> -#include <math-use-builtins.h>
> -
>
> double
> __round (double x)
> diff --git a/sysdeps/ieee754/dbl-64/s_roundeven.c b/sysdeps/ieee754/dbl-64/s_roundeven.c
> index 9f6b108dbd3..f35a1f63e60 100644
> --- a/sysdeps/ieee754/dbl-64/s_roundeven.c
> +++ b/sysdeps/ieee754/dbl-64/s_roundeven.c
> @@ -21,7 +21,6 @@
> #include <math_private.h>
> #include <libm-alias-double.h>
> #include <stdint.h>
> -#include <math-use-builtins.h>
>
> #define BIAS 0x3ff
> #define MANT_DIG 53
> diff --git a/sysdeps/ieee754/dbl-64/s_trunc.c b/sysdeps/ieee754/dbl-64/s_trunc.c
> index d2323d6f17f..c426770cb67 100644
> --- a/sysdeps/ieee754/dbl-64/s_trunc.c
> +++ b/sysdeps/ieee754/dbl-64/s_trunc.c
> @@ -21,8 +21,6 @@
>
> #include <math_private.h>
> #include <libm-alias-double.h>
> -#include <math-use-builtins.h>
> -
>
> double
> __trunc (double x)
> diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
> index 1430bba794c..d12cec94729 100644
> --- a/sysdeps/ieee754/float128/float128_private.h
> +++ b/sysdeps/ieee754/float128/float128_private.h
> @@ -142,7 +142,6 @@
> #define libm_alias_ldouble_narrow(from, to) \
> libm_alias_float128_narrow (from, to)
>
> -#include <math-use-builtins.h>
> #undef USE_NEARBYINTL_BUILTIN
> #define USE_NEARBYINTL_BUILTIN USE_NEARBYINTF128_BUILTIN
> #undef USE_RINTL_BUILTIN
> diff --git a/sysdeps/ieee754/flt-32/e_sqrtf.c b/sysdeps/ieee754/flt-32/e_sqrtf.c
> index 0e29375786c..e06a778eed1 100644
> --- a/sysdeps/ieee754/flt-32/e_sqrtf.c
> +++ b/sysdeps/ieee754/flt-32/e_sqrtf.c
> @@ -15,7 +15,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-finite.h>
> -#include <math-use-builtins.h>
>
> float
> __ieee754_sqrtf(float x)
> diff --git a/sysdeps/ieee754/flt-32/s_ceilf.c b/sysdeps/ieee754/flt-32/s_ceilf.c
> index 0263552deed..4ff9fe3230f 100644
> --- a/sysdeps/ieee754/flt-32/s_ceilf.c
> +++ b/sysdeps/ieee754/flt-32/s_ceilf.c
> @@ -16,7 +16,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
> float
> __ceilf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_floorf.c b/sysdeps/ieee754/flt-32/s_floorf.c
> index a5c38818f1f..b0447d73dac 100644
> --- a/sysdeps/ieee754/flt-32/s_floorf.c
> +++ b/sysdeps/ieee754/flt-32/s_floorf.c
> @@ -23,7 +23,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
> float
> __floorf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_llrintf.c b/sysdeps/ieee754/flt-32/s_llrintf.c
> index dab8d22f675..7aba715a487 100644
> --- a/sysdeps/ieee754/flt-32/s_llrintf.c
> +++ b/sysdeps/ieee754/flt-32/s_llrintf.c
> @@ -25,7 +25,6 @@
> #include <math_private.h>
> #include <libm-alias-float.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long long int
> diff --git a/sysdeps/ieee754/flt-32/s_llroundf.c b/sysdeps/ieee754/flt-32/s_llroundf.c
> index bb92acbc495..849735aa627 100644
> --- a/sysdeps/ieee754/flt-32/s_llroundf.c
> +++ b/sysdeps/ieee754/flt-32/s_llroundf.c
> @@ -23,7 +23,6 @@
> #include <math_private.h>
> #include <libm-alias-float.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
> long long int
> __llroundf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_logbf.c b/sysdeps/ieee754/flt-32/s_logbf.c
> index b027e7b9c24..29316e5787d 100644
> --- a/sysdeps/ieee754/flt-32/s_logbf.c
> +++ b/sysdeps/ieee754/flt-32/s_logbf.c
> @@ -16,7 +16,6 @@
> #include <math_private.h>
> #include <libm-alias-float.h>
> #include <fix-int-fp-convert-zero.h>
> -#include <math-use-builtins.h>
>
> float
> __logbf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_lrintf.c b/sysdeps/ieee754/flt-32/s_lrintf.c
> index 079bc5d70bd..a63fb7ba04d 100644
> --- a/sysdeps/ieee754/flt-32/s_lrintf.c
> +++ b/sysdeps/ieee754/flt-32/s_lrintf.c
> @@ -25,7 +25,6 @@
> #include <math_private.h>
> #include <libm-alias-float.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long int
> diff --git a/sysdeps/ieee754/flt-32/s_lroundf.c b/sysdeps/ieee754/flt-32/s_lroundf.c
> index f31c53136a6..50decf66570 100644
> --- a/sysdeps/ieee754/flt-32/s_lroundf.c
> +++ b/sysdeps/ieee754/flt-32/s_lroundf.c
> @@ -23,7 +23,6 @@
> #include <math_private.h>
> #include <libm-alias-float.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
> long int
> __lroundf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_modff.c b/sysdeps/ieee754/flt-32/s_modff.c
> index 965136bac9f..b5dac7521d3 100644
> --- a/sysdeps/ieee754/flt-32/s_modff.c
> +++ b/sysdeps/ieee754/flt-32/s_modff.c
> @@ -19,7 +19,6 @@
> #include <math.h>
> #include <libm-alias-float.h>
> #include "math_config.h"
> -#include <math-use-builtins-trunc.h>
>
> float
> __modff (float x, float *iptr)
> diff --git a/sysdeps/ieee754/flt-32/s_nearbyintf.c b/sysdeps/ieee754/flt-32/s_nearbyintf.c
> index 5dd0e8f8af8..162bcde906f 100644
> --- a/sysdeps/ieee754/flt-32/s_nearbyintf.c
> +++ b/sysdeps/ieee754/flt-32/s_nearbyintf.c
> @@ -19,7 +19,6 @@
> #include <math_private.h>
> #include <fenv_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
> float
> __nearbyintf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_rintf.c b/sysdeps/ieee754/flt-32/s_rintf.c
> index fe5258ae61d..32afd71e9aa 100644
> --- a/sysdeps/ieee754/flt-32/s_rintf.c
> +++ b/sysdeps/ieee754/flt-32/s_rintf.c
> @@ -16,7 +16,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
> float
> __rintf (float x)
> diff --git a/sysdeps/ieee754/flt-32/s_roundevenf.c b/sysdeps/ieee754/flt-32/s_roundevenf.c
> index 2981f365a58..882b55787de 100644
> --- a/sysdeps/ieee754/flt-32/s_roundevenf.c
> +++ b/sysdeps/ieee754/flt-32/s_roundevenf.c
> @@ -21,7 +21,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
> #include <stdint.h>
>
> #define BIAS 0x7f
> diff --git a/sysdeps/ieee754/flt-32/s_roundf.c b/sysdeps/ieee754/flt-32/s_roundf.c
> index eb714e975e4..746a7759f4e 100644
> --- a/sysdeps/ieee754/flt-32/s_roundf.c
> +++ b/sysdeps/ieee754/flt-32/s_roundf.c
> @@ -21,7 +21,6 @@
>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
>
> float
> diff --git a/sysdeps/ieee754/flt-32/s_truncf.c b/sysdeps/ieee754/flt-32/s_truncf.c
> index 6b36e1d4911..cef7c9168df 100644
> --- a/sysdeps/ieee754/flt-32/s_truncf.c
> +++ b/sysdeps/ieee754/flt-32/s_truncf.c
> @@ -21,7 +21,6 @@
>
> #include <math_private.h>
> #include <libm-alias-float.h>
> -#include <math-use-builtins.h>
>
>
> float
> diff --git a/sysdeps/ieee754/ldbl-128/s_ceill.c b/sysdeps/ieee754/ldbl-128/s_ceill.c
> index f363d2f898b..5040a27325e 100644
> --- a/sysdeps/ieee754/ldbl-128/s_ceill.c
> +++ b/sysdeps/ieee754/ldbl-128/s_ceill.c
> @@ -27,7 +27,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __ceill (_Float128 x)
> diff --git a/sysdeps/ieee754/ldbl-128/s_copysignl.c b/sysdeps/ieee754/ldbl-128/s_copysignl.c
> index d512d9a1e23..92b83526483 100644
> --- a/sysdeps/ieee754/ldbl-128/s_copysignl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_copysignl.c
> @@ -26,7 +26,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __copysignl (_Float128 x, _Float128 y)
> diff --git a/sysdeps/ieee754/ldbl-128/s_floorl.c b/sysdeps/ieee754/ldbl-128/s_floorl.c
> index 02eb663dd58..7c9d518fef5 100644
> --- a/sysdeps/ieee754/ldbl-128/s_floorl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_floorl.c
> @@ -27,7 +27,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __floorl (_Float128 x)
> diff --git a/sysdeps/ieee754/ldbl-128/s_fma.c b/sysdeps/ieee754/ldbl-128/s_fma.c
> index 01ca5562608..bf1b0664d2f 100644
> --- a/sysdeps/ieee754/ldbl-128/s_fma.c
> +++ b/sysdeps/ieee754/ldbl-128/s_fma.c
> @@ -26,7 +26,6 @@
> #include <ieee754.h>
> #include <libm-alias-double.h>
> #include <math-narrow-alias.h>
> -#include <math-use-builtins.h>
>
> /* This implementation relies on long double being more than twice as
> precise as double and uses rounding to odd in order to avoid problems
> diff --git a/sysdeps/ieee754/ldbl-128/s_fmal.c b/sysdeps/ieee754/ldbl-128/s_fmal.c
> index 17ad90ca310..ea253330b3a 100644
> --- a/sysdeps/ieee754/ldbl-128/s_fmal.c
> +++ b/sysdeps/ieee754/ldbl-128/s_fmal.c
> @@ -28,7 +28,6 @@
> #include <libm-alias-ldouble.h>
> #include <math-narrow-alias.h>
> #include <tininess.h>
> -#include <math-use-builtins.h>
>
> /* This implementation uses rounding to odd to avoid problems with
> double rounding. See a paper by Boldo and Melquiond:
> diff --git a/sysdeps/ieee754/ldbl-128/s_llrintl.c b/sysdeps/ieee754/ldbl-128/s_llrintl.c
> index 07f5aca347e..d9283eab3ea 100644
> --- a/sysdeps/ieee754/ldbl-128/s_llrintl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_llrintl.c
> @@ -24,7 +24,6 @@
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long long int
> diff --git a/sysdeps/ieee754/ldbl-128/s_logbl.c b/sysdeps/ieee754/ldbl-128/s_logbl.c
> index 59b08aa2955..7927155cac3 100644
> --- a/sysdeps/ieee754/ldbl-128/s_logbl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_logbl.c
> @@ -25,7 +25,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __logbl (_Float128 x)
> diff --git a/sysdeps/ieee754/ldbl-128/s_lrintl.c b/sysdeps/ieee754/ldbl-128/s_lrintl.c
> index e5c0d5adb87..027400d1371 100644
> --- a/sysdeps/ieee754/ldbl-128/s_lrintl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_lrintl.c
> @@ -24,7 +24,6 @@
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> #include <fix-fp-int-convert-overflow.h>
> -#include <math-use-builtins.h>
>
>
> long int
> diff --git a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
> index d76d0155ad2..8e2b5bd1fa1 100644
> --- a/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_nearbyintl.c
> @@ -27,7 +27,6 @@
> #include <math-barriers.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __nearbyintl (_Float128 x)
> diff --git a/sysdeps/ieee754/ldbl-128/s_rintl.c b/sysdeps/ieee754/ldbl-128/s_rintl.c
> index 072ed8ec15e..7badd06e85d 100644
> --- a/sysdeps/ieee754/ldbl-128/s_rintl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_rintl.c
> @@ -30,7 +30,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> _Float128
> __rintl (_Float128 x)
> diff --git a/sysdeps/ieee754/ldbl-128/s_roundevenl.c b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
> index ca3a5527cd9..0f935f63dde 100644
> --- a/sysdeps/ieee754/ldbl-128/s_roundevenl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_roundevenl.c
> @@ -21,7 +21,6 @@
> #include <math.h>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
> #include <stdint.h>
>
> #define BIAS 0x3fff
> diff --git a/sysdeps/ieee754/ldbl-128/s_roundl.c b/sysdeps/ieee754/ldbl-128/s_roundl.c
> index 9a87a463e89..c5e70f33a84 100644
> --- a/sysdeps/ieee754/ldbl-128/s_roundl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_roundl.c
> @@ -21,7 +21,6 @@
>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
>
> _Float128
> diff --git a/sysdeps/ieee754/ldbl-128/s_truncl.c b/sysdeps/ieee754/ldbl-128/s_truncl.c
> index 2db087e85b3..f4c6415521e 100644
> --- a/sysdeps/ieee754/ldbl-128/s_truncl.c
> +++ b/sysdeps/ieee754/ldbl-128/s_truncl.c
> @@ -21,7 +21,6 @@
>
> #include <math_private.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
>
> _Float128
> diff --git a/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c b/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
> index 7f26315e842..fabe08f0b3a 100644
> --- a/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
> +++ b/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
> @@ -24,7 +24,6 @@ static char rcsid[] = "$NetBSD: $";
> #include <math.h>
> #include <math_private.h>
> #include <math_ldbl_opt.h>
> -#include <math-use-builtins.h>
>
> long double __fabsl(long double x)
> {
> diff --git a/sysdeps/ieee754/ldbl-96/s_fabsl.c b/sysdeps/ieee754/ldbl-96/s_fabsl.c
> index 9891bb3a023..19bcf089b37 100644
> --- a/sysdeps/ieee754/ldbl-96/s_fabsl.c
> +++ b/sysdeps/ieee754/ldbl-96/s_fabsl.c
> @@ -18,7 +18,6 @@
>
> #include <math.h>
> #include <libm-alias-ldouble.h>
> -#include <math-use-builtins.h>
>
> long double
> __fabsl (long double x)
> diff --git a/sysdeps/mips/fpu/math-use-builtins-fma.h b/sysdeps/mips/fpu/math-use-builtins-fma.h
> index 06e97922aa0..bc65da7429e 100644
> --- a/sysdeps/mips/fpu/math-use-builtins-fma.h
> +++ b/sysdeps/mips/fpu/math-use-builtins-fma.h
> @@ -19,7 +19,7 @@
> ISA, double support can be subsetted. Only FMAF is enabled for this
> case. */
>
> -#include <sysdep.h>
> +#include <sgidefs.h>
>
> #if __mips_isa_rev >= 6
> # ifdef __mips_single_float
> diff --git a/sysdeps/mips/math-use-builtins-ffs.h b/sysdeps/mips/math-use-builtins-ffs.h
> index 2ab6a03a168..4a3b432527a 100644
> --- a/sysdeps/mips/math-use-builtins-ffs.h
> +++ b/sysdeps/mips/math-use-builtins-ffs.h
> @@ -1,3 +1,3 @@
> -#include <sysdep.h>
> +#include <sgidefs.h>
> #define USE_FFS_BUILTIN (__mips_isa_rev >= 1)
> #define USE_FFSLL_BUILTIN (__mips_isa_rev >= 1)
> diff --git a/sysdeps/mips/sgidefs.h b/sysdeps/mips/sgidefs.h
> index a8b31905df1..4656582782d 100644
> --- a/sysdeps/mips/sgidefs.h
> +++ b/sysdeps/mips/sgidefs.h
> @@ -24,6 +24,9 @@
> #undef __ASM_SGIDEFS_H
> #define __ASM_SGIDEFS_H
>
> +#ifndef __mips_isa_rev
> +# define __mips_isa_rev 0
> +#endif
> /*
> * And remove any damage it might have already done
> */
> diff --git a/sysdeps/powerpc/fpu/e_sqrt.c b/sysdeps/powerpc/fpu/e_sqrt.c
> index 9bac5c2bbcf..a65e8189261 100644
> --- a/sysdeps/powerpc/fpu/e_sqrt.c
> +++ b/sysdeps/powerpc/fpu/e_sqrt.c
> @@ -20,7 +20,6 @@
> #include <math_private.h>
> #include <fenv_libc.h>
> #include <libm-alias-finite.h>
> -#include <math-use-builtins.h>
>
> double
> __ieee754_sqrt (double x)
> diff --git a/sysdeps/powerpc/fpu/e_sqrtf.c b/sysdeps/powerpc/fpu/e_sqrtf.c
> index 7c339044495..d29a9a70173 100644
> --- a/sysdeps/powerpc/fpu/e_sqrtf.c
> +++ b/sysdeps/powerpc/fpu/e_sqrtf.c
> @@ -20,7 +20,6 @@
> #include <math_private.h>
> #include <fenv_libc.h>
> #include <libm-alias-finite.h>
> -#include <math-use-builtins.h>
>
> float
> __ieee754_sqrtf (float x)
> diff --git a/sysdeps/unix/mips/sysdep.h b/sysdeps/unix/mips/sysdep.h
> index 5f7706b182b..58e7aa2531b 100644
> --- a/sysdeps/unix/mips/sysdep.h
> +++ b/sysdeps/unix/mips/sysdep.h
> @@ -18,9 +18,6 @@
> #include <sgidefs.h>
> #include <sysdeps/unix/sysdep.h>
>
> -#ifndef __mips_isa_rev
> -# define __mips_isa_rev 0
> -#endif
>
> #ifdef __ASSEMBLER__
>
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_modf-avx.c b/sysdeps/x86_64/fpu/multiarch/s_modf-avx.c
> index 0982280d252..9b8b951a97c 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_modf-avx.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_modf-avx.c
> @@ -1,6 +1,2 @@
> -#include <math_private.h>
> -
> #define __modf __modf_avx
> -#define trunc __trunc
> -
> #include <sysdeps/ieee754/dbl-64/s_modf.c>
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c b/sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c
> index f6fb996f979..1f773863364 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_modf-sse4_1.c
> @@ -1,6 +1,2 @@
> -#include <math_private.h>
> -
> #define __modf __modf_sse41
> -#define trunc __trunc
> -
> #include <sysdeps/ieee754/dbl-64/s_modf.c>
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_modff-avx.c b/sysdeps/x86_64/fpu/multiarch/s_modff-avx.c
> index b2afe1efe3c..488f93700c0 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_modff-avx.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_modff-avx.c
> @@ -1,6 +1,2 @@
> -#include <math_private.h>
> -
> #define __modff __modff_avx
> -#define truncf __truncf
> -
> #include <sysdeps/ieee754/flt-32/s_modff.c>
> diff --git a/sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c b/sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c
> index 0352c3ea4ba..8e49970ffc7 100644
> --- a/sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c
> +++ b/sysdeps/x86_64/fpu/multiarch/s_modff-sse4_1.c
> @@ -1,6 +1,2 @@
> -#include <math_private.h>
> -
> #define __modff __modff_sse41
> -#define truncf __truncf
> -
> #include <sysdeps/ieee754/flt-32/s_modff.c>
> --
> 2.43.0
>
LGTM.
Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
Thanks.
--
H.J.
More information about the Libc-alpha
mailing list