2017-11-28 Joseph Myers <joseph@codesourcery.com>
+ * sysdeps/alpha/fpu/cfloat-compat.h: Include <libm-alias-float.h>.
+ (cfloat_versions): Take function argument without trailing 'f'.
+ Call libm_alias_float_other.
+ * sysdeps/alpha/fpu/cabsf.c: Update call to cfloat_versions.
+ * sysdeps/alpha/fpu/cargf.c: Likewise.
+ * sysdeps/alpha/fpu/cimagf.c: Likewise.
+ * sysdeps/alpha/fpu/conjf.c: Likewise.
+ * sysdeps/alpha/fpu/crealf.c: Likewise.
+ * sysdeps/alpha/fpu/s_cacosf.c: Likewise.
+ * sysdeps/alpha/fpu/s_cacoshf.c: Likewise.
+ * sysdeps/alpha/fpu/s_casinf.c: Likewise.
+ * sysdeps/alpha/fpu/s_casinhf.c: Likewise.
+ * sysdeps/alpha/fpu/s_catanf.c: Likewise.
+ * sysdeps/alpha/fpu/s_catanhf.c: Likewise.
+ * sysdeps/alpha/fpu/s_ccosf.c: Likewise.
+ * sysdeps/alpha/fpu/s_ccoshf.c: Likewise.
+ * sysdeps/alpha/fpu/s_cexpf.c: Likewise.
+ * sysdeps/alpha/fpu/s_clogf.c: Likewise.
+ * sysdeps/alpha/fpu/s_cpowf.c: Likewise.
+ * sysdeps/alpha/fpu/s_cprojf.c: Likewise.
+ * sysdeps/alpha/fpu/s_csinf.c: Likewise.
+ * sysdeps/alpha/fpu/s_csinhf.c: Likewise.
+ * sysdeps/alpha/fpu/s_csqrtf.c: Likewise.
+ * sysdeps/alpha/fpu/s_ctanf.c: Likewise.
+ * sysdeps/alpha/fpu/s_ctanhf.c: Likewise.
+ * sysdeps/alpha/fpu/s_clog10f.c: Include <libm-alias-float.h>.
+ (clog10f): Use libm_alias_float_other.
+ * sysdeps/alpha/fpu/s_ceilf.c: Include <libm-alias-float.h>.
+ (ceilf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_copysignf.c: Include <libm-alias-float.h>.
+ (copysignf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_fabsf.c: Include <libm-alias-float.h>.
+ (fabsf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_floorf.c: Include <libm-alias-float.h>.
+ (floorf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_fmax.S: Include <libm-alias-float.h>.
+ (fmaxf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_fmin.S: Include <libm-alias-float.h>.
+ (fminf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_lrintf.c: Include <libm-alias-float.h>.
+ (lrintf): Define using libm_alias_float.
+ (llrintf): Likewise.
+ * sysdeps/alpha/fpu/s_lroundf.c: Include <libm-alias-float.h>.
+ (lroundf): Define using libm_alias_float.
+ (llroundf): Likewise.
+ * sysdeps/alpha/fpu/s_rintf.c: Include <libm-alias-float.h>.
+ (rintf): Define using libm_alias_float.
+ * sysdeps/alpha/fpu/s_truncf.c: Include <libm-alias-float.h>.
+ (truncf): Define using libm_alias_float.
+
* sysdeps/aarch64/fpu/s_ceilf.c: Include <libm-alias-float.h>.
(ceilf): Define using libm_alias_float.
* sysdeps/aarch64/fpu/s_floorf.c: Include <libm-alias-float.h>.
return __hypotf (c2_cfloat_real (z), c2_cfloat_imag (z));
}
-cfloat_versions (cabsf);
+cfloat_versions (cabs);
return __atan2f (c2_cfloat_imag (x), c2_cfloat_real (x));
}
-cfloat_versions (cargf);
+cfloat_versions (carg);
/* Get the proper symbol versions defined for each function. */
#include <shlib-compat.h>
+#include <libm-alias-float.h>
#if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_3_4)
#define cfloat_versions_compat(func) \
#endif
#define cfloat_versions(func) \
- cfloat_versions_compat(func); \
- versioned_symbol (libm, __c2_##func, func, GLIBC_2_3_4); \
- extern typeof(__c2_##func) __##func attribute_hidden; \
- strong_alias (__c2_##func, __##func)
+ cfloat_versions_compat(func##f); \
+ versioned_symbol (libm, __c2_##func##f, func##f, GLIBC_2_3_4); \
+ extern typeof(__c2_##func##f) __##func##f attribute_hidden; \
+ strong_alias (__c2_##func##f, __##func##f); \
+ libm_alias_float_other (__##func, func)
return c2_cfloat_imag (z);
}
-cfloat_versions (cimagf);
+cfloat_versions (cimag);
return c2_cfloat_return (r);
}
-cfloat_versions (conjf);
+cfloat_versions (conj);
return c2_cfloat_real (z);
}
-cfloat_versions (crealf);
+cfloat_versions (creal);
return c2_cfloat_return (r);
}
-cfloat_versions (cacosf);
+cfloat_versions (cacos);
return c2_cfloat_return (r);
}
-cfloat_versions (cacoshf);
+cfloat_versions (cacosh);
return c2_cfloat_return (r);
}
-cfloat_versions (casinf);
+cfloat_versions (casin);
return c2_cfloat_return (r);
}
-cfloat_versions (casinhf);
+cfloat_versions (casinh);
return c2_cfloat_return (r);
}
-cfloat_versions (catanf);
+cfloat_versions (catan);
return c2_cfloat_return (r);
}
-cfloat_versions (catanhf);
+cfloat_versions (catanh);
return c2_cfloat_return (r);
}
-cfloat_versions (ccosf);
+cfloat_versions (ccos);
return c2_cfloat_return (r);
}
-cfloat_versions (ccoshf);
+cfloat_versions (ccosh);
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
/* Use the -inf rounding mode conversion instructions to implement
ceil, via something akin to -floor(-x). This is much faster than
return x;
}
-weak_alias (__ceilf, ceilf)
+libm_alias_float (__ceil, ceil)
return c2_cfloat_return (r);
}
-cfloat_versions (cexpf);
+cfloat_versions (cexp);
#include <complex.h>
#include <math.h>
+#include <libm-alias-float.h>
#undef __clog10f
#undef clog10f
versioned_symbol (libm, __c2_clog10f, clog10f, GLIBC_2_3_4);
extern typeof(__c2_clog10f) __clog10f attribute_hidden;
strong_alias (__c2_clog10f, __clog10f)
+libm_alias_float_other (__c2_clog10, clog10)
return c2_cfloat_return (r);
}
-cfloat_versions (clogf);
+cfloat_versions (clog);
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
float
__copysignf (float x, float y)
return __builtin_copysignf (x, y);
}
-weak_alias (__copysignf, copysignf)
+libm_alias_float (__copysign, copysign)
return c2_cfloat_return (r);
}
-cfloat_versions (cpowf);
+cfloat_versions (cpow);
return c2_cfloat_return (r);
}
-cfloat_versions (cprojf);
+cfloat_versions (cproj);
return c2_cfloat_return (r);
}
-cfloat_versions (csinf);
+cfloat_versions (csin);
return c2_cfloat_return (r);
}
-cfloat_versions (csinhf);
+cfloat_versions (csinh);
return c2_cfloat_return (r);
}
-cfloat_versions (csqrtf);
+cfloat_versions (csqrt);
return c2_cfloat_return (r);
}
-cfloat_versions (ctanf);
+cfloat_versions (ctan);
return c2_cfloat_return (r);
}
-cfloat_versions (ctanhf);
+cfloat_versions (ctanh);
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
float
__fabsf (float x)
return __builtin_fabsf (x);
}
-weak_alias (__fabsf, fabsf)
+libm_alias_float (__fabs, fabs)
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
/* Use the -inf rounding mode conversion instructions to implement
return x;
}
-weak_alias (__floorf, floorf)
+libm_alias_float (__floor, floor)
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-float.h>
#include <libm-alias-double.h>
.set noat
/* Given the in-register format of single-precision, this works there too. */
strong_alias (__fmax, __fmaxf)
-weak_alias (__fmaxf, fmaxf)
+libm_alias_float (__fmax, fmax)
libm_alias_double (__fmax, fmax)
#include <sysdep.h>
#include <math_ldbl_opt.h>
+#include <libm-alias-float.h>
#include <libm-alias-double.h>
.set noat
/* Given the in-register format of single-precision, this works there too. */
strong_alias (__fmin, __fminf)
-weak_alias (__fminf, fminf)
+libm_alias_float (__fmin, fmin)
libm_alias_double (__fmin, fmin)
#define __llrintf not___llrintf
#define llrintf not_llrintf
#include <math.h>
+#include <libm-alias-float.h>
#undef __llrintf
#undef llrintf
}
strong_alias (__lrintf, __llrintf)
-weak_alias (__lrintf, lrintf)
-weak_alias (__llrintf, llrintf)
+libm_alias_float (__lrint, lrint)
+libm_alias_float (__llrint, llrint)
#define __llroundf not___llroundf
#define llroundf not_llroundf
#include <math.h>
+#include <libm-alias-float.h>
#undef __llroundf
#undef llroundf
}
strong_alias (__lroundf, __llroundf)
-weak_alias (__lroundf, lroundf)
-weak_alias (__llroundf, llroundf)
+libm_alias_float (__lround, lround)
+libm_alias_float (__llround, llround)
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
float
return x;
}
-weak_alias (__rintf, rintf)
+libm_alias_float (__rint, rint)
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-float.h>
/* Use the chopped rounding mode conversion instructions to implement trunc. */
return copysignf (r, x);
}
-weak_alias (__truncf, truncf)
+libm_alias_float (__trunc, trunc)