* Use __HAVE_DISTINCT_FLOAT128 in tgmath.h [committed]
@ 2017-08-25 17:03 Joseph Myers
0 siblings, 0 replies; only message in thread
From: Joseph Myers @ 2017-08-25 17:03 UTC (permalink / raw)
To: libc-alpha
When _Float128 is ABI-equivalent to long double, there is no need for
tgmath.h to have any special _Float128 handling: it's always OK to
call the long double versions of functions for _Float128 arguments in
that case, and the logic to determine return types is generic. Thus,
this patch changes the use of __HAVE_FLOAT128 to
__HAVE_DISTINCT_FLOAT128, as a minor optimization to reduce the size
of the macro expansions in the ABI-equivalent case.
Tested for x86_64. Committed.
2017-08-25 Joseph Myers <joseph@codesourcery.com>
* math/tgmath.h [__HAVE_FLOAT128]: Change conditional to
[__HAVE_DISTINCT_FLOAT128].
diff --git a/math/tgmath.h b/math/tgmath.h
index 68cee64..243813c 100644
--- a/math/tgmath.h
+++ b/math/tgmath.h
@@ -118,7 +118,7 @@
/* Expand to text that checks if ARG_COMB has type _Float128, and if
so calls the appropriately suffixed FCT (which may include a cast),
or FCT and CFCT for complex functions, with arguments ARG_CALL. */
-# if __HAVE_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
+# if __HAVE_DISTINCT_FLOAT128 && __GLIBC_USE (IEC_60559_TYPES_EXT)
# define __TGMATH_F128(arg_comb, fct, arg_call) \
__builtin_types_compatible_p (__typeof (+(arg_comb)), _Float128) \
? fct ## f128 arg_call :
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-08-25 17:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 17:03 Use __HAVE_DISTINCT_FLOAT128 in tgmath.h [committed] Joseph Myers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).