mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Only add l suffixes if __NO_LONG_DOUBLE_MATH is not defined.
This commit is contained in:
@ -36,6 +36,12 @@
|
|||||||
|
|
||||||
#if __GNUC_PREREQ (2, 7)
|
#if __GNUC_PREREQ (2, 7)
|
||||||
|
|
||||||
|
# ifdef __NO_LONG_DOUBLE_MATH
|
||||||
|
# define __tgml(fct) fct
|
||||||
|
# else
|
||||||
|
# define __tgml(fct) fct ## l
|
||||||
|
# endif
|
||||||
|
|
||||||
/* This is ugly but unless gcc gets appropriate builtins we have to do
|
/* This is ugly but unless gcc gets appropriate builtins we have to do
|
||||||
something like this. Don't ask how it works. */
|
something like this. Don't ask how it works. */
|
||||||
|
|
||||||
@ -65,7 +71,7 @@
|
|||||||
else if (sizeof (Val) == sizeof (float)) \
|
else if (sizeof (Val) == sizeof (float)) \
|
||||||
__tgmres = Fct##f (Val); \
|
__tgmres = Fct##f (Val); \
|
||||||
else \
|
else \
|
||||||
__tgmres = Fct##l (Val); \
|
__tgmres = __tgml(Fct) (Val); \
|
||||||
__tgmres; }))
|
__tgmres; }))
|
||||||
|
|
||||||
# define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
|
# define __TGMATH_BINARY_FIRST_REAL_ONLY(Val1, Val2, Fct) \
|
||||||
@ -76,7 +82,7 @@
|
|||||||
else if (sizeof (Val1) == sizeof (float)) \
|
else if (sizeof (Val1) == sizeof (float)) \
|
||||||
__tgmres = Fct##f (Val1, Val2); \
|
__tgmres = Fct##f (Val1, Val2); \
|
||||||
else \
|
else \
|
||||||
__tgmres = Fct##l (Val1, Val2); \
|
__tgmres = __tgml(Fct) (Val1, Val2); \
|
||||||
__tgmres; }))
|
__tgmres; }))
|
||||||
|
|
||||||
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
|
# define __TGMATH_BINARY_REAL_ONLY(Val1, Val2, Fct) \
|
||||||
@ -84,7 +90,7 @@
|
|||||||
if ((sizeof (Val1) > sizeof (double) \
|
if ((sizeof (Val1) > sizeof (double) \
|
||||||
|| sizeof (Val2) > sizeof (double)) \
|
|| sizeof (Val2) > sizeof (double)) \
|
||||||
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
|
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
|
||||||
__tgmres = Fct##l (Val1, Val2); \
|
__tgmres = __tgml(Fct) (Val1, Val2); \
|
||||||
else if (sizeof (Val1) == sizeof (double) \
|
else if (sizeof (Val1) == sizeof (double) \
|
||||||
|| sizeof (Val2) == sizeof (double) \
|
|| sizeof (Val2) == sizeof (double) \
|
||||||
|| __builtin_classify_type ((Val1) \
|
|| __builtin_classify_type ((Val1) \
|
||||||
@ -99,7 +105,7 @@
|
|||||||
if ((sizeof (Val1) > sizeof (double) \
|
if ((sizeof (Val1) > sizeof (double) \
|
||||||
|| sizeof (Val2) > sizeof (double)) \
|
|| sizeof (Val2) > sizeof (double)) \
|
||||||
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
|
&& __builtin_classify_type ((Val1) + (Val2)) == 8) \
|
||||||
__tgmres = Fct##l (Val1, Val2, Val3); \
|
__tgmres = __tgml(Fct) (Val1, Val2, Val3); \
|
||||||
else if (sizeof (Val1) == sizeof (double) \
|
else if (sizeof (Val1) == sizeof (double) \
|
||||||
|| sizeof (Val2) == sizeof (double) \
|
|| sizeof (Val2) == sizeof (double) \
|
||||||
|| __builtin_classify_type ((Val1) \
|
|| __builtin_classify_type ((Val1) \
|
||||||
@ -116,7 +122,7 @@
|
|||||||
|| sizeof (Val3) > sizeof (double)) \
|
|| sizeof (Val3) > sizeof (double)) \
|
||||||
&& __builtin_classify_type ((Val1) + (Val2) \
|
&& __builtin_classify_type ((Val1) + (Val2) \
|
||||||
+ (Val3)) == 8) \
|
+ (Val3)) == 8) \
|
||||||
__tgmres = Fct##l (Val1, Val2, Val3); \
|
__tgmres = __tgml(Fct) (Val1, Val2, Val3); \
|
||||||
else if (sizeof (Val1) == sizeof (double) \
|
else if (sizeof (Val1) == sizeof (double) \
|
||||||
|| sizeof (Val2) == sizeof (double) \
|
|| sizeof (Val2) == sizeof (double) \
|
||||||
|| sizeof (Val3) == sizeof (double) \
|
|| sizeof (Val3) == sizeof (double) \
|
||||||
@ -135,9 +141,9 @@
|
|||||||
&& __builtin_classify_type (__real__ (Val)) == 8) \
|
&& __builtin_classify_type (__real__ (Val)) == 8) \
|
||||||
{ \
|
{ \
|
||||||
if (sizeof (__real__ (Val)) == sizeof (Val)) \
|
if (sizeof (__real__ (Val)) == sizeof (Val)) \
|
||||||
__tgmres = Fct##l (Val); \
|
__tgmres = __tgml(Fct) (Val); \
|
||||||
else \
|
else \
|
||||||
__tgmres = Cfct##l (Val); \
|
__tgmres = __tgml(Cfct) (Val); \
|
||||||
} \
|
} \
|
||||||
else if (sizeof (__real__ (Val)) == sizeof (double) \
|
else if (sizeof (__real__ (Val)) == sizeof (double) \
|
||||||
|| __builtin_classify_type (__real__ (Val)) \
|
|| __builtin_classify_type (__real__ (Val)) \
|
||||||
@ -167,7 +173,7 @@
|
|||||||
else if (sizeof (Val) == sizeof (__complex__ float)) \
|
else if (sizeof (Val) == sizeof (__complex__ float)) \
|
||||||
__tgmres = Fct##f (Val); \
|
__tgmres = Fct##f (Val); \
|
||||||
else \
|
else \
|
||||||
__tgmres = Fct##l (Val); \
|
__tgmres = __tgml(Fct) (Val); \
|
||||||
__tgmres; }))
|
__tgmres; }))
|
||||||
|
|
||||||
/* XXX This definition has to be changed as soon as the compiler understands
|
/* XXX This definition has to be changed as soon as the compiler understands
|
||||||
@ -182,9 +188,9 @@
|
|||||||
{ \
|
{ \
|
||||||
if (sizeof (__real__ (Val1)) == sizeof (Val1) \
|
if (sizeof (__real__ (Val1)) == sizeof (Val1) \
|
||||||
&& sizeof (__real__ (Val2)) == sizeof (Val2)) \
|
&& sizeof (__real__ (Val2)) == sizeof (Val2)) \
|
||||||
__tgmres = Fct##l (Val1, Val2); \
|
__tgmres = __tgml(Fct) (Val1, Val2); \
|
||||||
else \
|
else \
|
||||||
__tgmres = Cfct##l (Val1, Val2); \
|
__tgmres = __tgml(Cfct) (Val1, Val2); \
|
||||||
} \
|
} \
|
||||||
else if (sizeof (__real__ (Val1)) == sizeof (double) \
|
else if (sizeof (__real__ (Val1)) == sizeof (double) \
|
||||||
|| sizeof (__real__ (Val2)) == sizeof(double) \
|
|| sizeof (__real__ (Val2)) == sizeof(double) \
|
||||||
|
Reference in New Issue
Block a user