diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-12-19 02:02:26 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-12-19 02:02:26 +0000 |
commit | 664251859260d3cca6a477fb08c3b9f2b78a4fd9 (patch) | |
tree | 6862a783277d1253893d35f3afba0b0c796c9f49 /sysdeps/m68k/m680x0/fpu/mathimpl.h | |
parent | 8e52f573a1e0c2c39968051bcf683805540deb03 (diff) |
Fix m68k bits/mathinline.h attributes (bug 22631).
m68k bits/mathinline.h declares various functions with const
attributes. These are inappropriate for functions that have results
depending on the rounding mode; the machine-independent
bits/mathcalls.h only uses const attributes for a very few functions
with no rounding mode dependence, and the m68k header should do
likewise. GCC uses pure for such functions with -frounding-math,
resulting in GCC mainline warning for conflicts with between the
header and the built-in attributes and glibc failing to build for m68k
with GCC mainline.
This patch fixes the attributes to avoid using const except when
bits/mathcalls.h does so. (There are a few functions where maybe
bits/mathcalls.h could do so but doesn't, but keeping the headers in
sync in this regard seems to be the safe approach.)
Tested compilation with build-many-glibcs.py with GCC mainline.
[BZ #22631]
* sysdeps/m68k/m680x0/fpu/bits/mathinline.h (__m81_defun): Add
argument for attrubutes. All callers changed.
(__inline_mathop1): Likewise. All callers changed.
(__inline_mathop): Likewise. All callers changed.
[__USE_MISC] (scalbn): Use __inline_forward instead of
__inline_forward_c.
[__USE_ISOC99] (scalbln): Likewise.
[__USE_ISOC99] (nearbyint): Likewise.
[__USE_ISOC99] (lrint): Likewise.
[__USE_MISC] (scalbnf): Likewise.
[__USE_ISOC99] (scalblnf): Likewise.
[__USE_ISOC99] (nearbyintf): Likewise.
[__USE_ISOC99] (lrintf): Likewise.
[__USE_MISC] (scalbnl): Likewise.
[__USE_ISOC99] (scalblnl): Likewise.
[__USE_ISOC99] (nearbyintl): Likewise.
[__USE_ISOC99] (lrintl): Likewise.
* sysdeps/m68k/m680x0/fpu/mathimpl.h: All callers of
__inline_mathop and __m81_defun changed.
Diffstat (limited to 'sysdeps/m68k/m680x0/fpu/mathimpl.h')
-rw-r--r-- | sysdeps/m68k/m680x0/fpu/mathimpl.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/sysdeps/m68k/m680x0/fpu/mathimpl.h b/sysdeps/m68k/m680x0/fpu/mathimpl.h index 653df96873..2be4e1a01c 100644 --- a/sysdeps/m68k/m680x0/fpu/mathimpl.h +++ b/sysdeps/m68k/m680x0/fpu/mathimpl.h @@ -20,27 +20,27 @@ /* This file contains the definitions of the inline math functions that are only used internally inside libm, not visible to the user. */ -__inline_mathop (__ieee754_acos, acos) -__inline_mathop (__ieee754_asin, asin) -__inline_mathop (__ieee754_cosh, cosh) -__inline_mathop (__ieee754_sinh, sinh) -__inline_mathop (__ieee754_exp, etox) -__inline_mathop (__ieee754_exp2, twotox) -__inline_mathop (__ieee754_exp10, tentox) -__inline_mathop (__ieee754_log10, log10) -__inline_mathop (__ieee754_log2, log2) -__inline_mathop (__ieee754_log, logn) -__inline_mathop (__ieee754_sqrt, sqrt) -__inline_mathop (__ieee754_atanh, atanh) +__inline_mathop (__ieee754_acos, acos,) +__inline_mathop (__ieee754_asin, asin,) +__inline_mathop (__ieee754_cosh, cosh,) +__inline_mathop (__ieee754_sinh, sinh,) +__inline_mathop (__ieee754_exp, etox,) +__inline_mathop (__ieee754_exp2, twotox,) +__inline_mathop (__ieee754_exp10, tentox,) +__inline_mathop (__ieee754_log10, log10,) +__inline_mathop (__ieee754_log2, log2,) +__inline_mathop (__ieee754_log, logn,) +__inline_mathop (__ieee754_sqrt, sqrt,) +__inline_mathop (__ieee754_atanh, atanh,) -__m81_defun (double, __ieee754_remainder, (double __x, double __y)) +__m81_defun (double, __ieee754_remainder, (double __x, double __y),) { double __result; __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); return __result; } -__m81_defun (float, __ieee754_remainderf, (float __x, float __y)) +__m81_defun (float, __ieee754_remainderf, (float __x, float __y),) { float __result; __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); @@ -48,21 +48,21 @@ __m81_defun (float, __ieee754_remainderf, (float __x, float __y)) } __m81_defun (long double, - __ieee754_remainderl, (long double __x, long double __y)) + __ieee754_remainderl, (long double __x, long double __y),) { long double __result; __asm ("frem%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); return __result; } -__m81_defun (double, __ieee754_fmod, (double __x, double __y)) +__m81_defun (double, __ieee754_fmod, (double __x, double __y),) { double __result; __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); return __result; } -__m81_defun (float, __ieee754_fmodf, (float __x, float __y)) +__m81_defun (float, __ieee754_fmodf, (float __x, float __y),) { float __result; __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); @@ -70,7 +70,7 @@ __m81_defun (float, __ieee754_fmodf, (float __x, float __y)) } __m81_defun (long double, - __ieee754_fmodl, (long double __x, long double __y)) + __ieee754_fmodl, (long double __x, long double __y),) { long double __result; __asm ("fmod%.x %1, %0" : "=f" (__result) : "f" (__y), "0" (__x)); |