aboutsummaryrefslogtreecommitdiff
path: root/libgcc/libgcc2.c
diff options
context:
space:
mode:
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-18 23:27:26 +0000
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>2014-09-18 23:27:26 +0000
commit168dfbf0dbb5132c6ed67203631dca068259973f (patch)
treee1e000c788f9ea68c8ba46ee3d61a85c1bd7f81b /libgcc/libgcc2.c
parentce6bb0f3c801a838dfcd75861b778258ac56f814 (diff)
Remove LIBGCC2_TF_CEXT target macro.
This patch removes the (undocumented) LIBGCC2_TF_CEXT target macro, replacing it by -fbuilding-libgcc predefines (and thereby gets rid of another LIBGCC2_LONG_DOUBLE_TYPE_SIZE conditional, though some more patches are needed before that target macro can be eliminated). This macro indicated the suffix used on __builtin_huge_val, __builtin_copysign, __builtin_fabs built-in function names to produce the names for a given floating-point mode. Predefines are added for all floating-point modes supported for libgcc, not just TFmode. These are fully accurate for modes corresponding to float, double and long double. For other modes, the suffix for *constants* is determined by the targetm.c.mode_for_suffix hook (the limit to two possible suffixes 'w' and 'q' being hardcoded in various places). This is in fact the suffix for built-in functions as well where such functions exist. * For i386, the *q functions always exist (whether or not TFmode is used for long double). The *w functions never exist (but this doesn't matter for libgcc, since no i386 configuration treats XFmode as a supported scalar mode if long double is TFmode; if __float80 were to be supported for 64-bit Android, properly such functions ought to be added). * For ia64, the *q functions exist for non-HP-UX (under HP-UX, long double is TFmode, so they aren't needed). The *w functions never exist. This is an issue for this libgcc code for the XFmode complex functions in libgcc on HP-UX; as I understand it, right now those will accidentally be using TFmode versions of those three functions, so involving unnecessary conversions, while the sanity check on CEXT accidentally passes because all it tests is the sizes of the types. Because of the lack of 'w' functions, the patch uses 'l' when the constant suffix is 'w', matching what the existing libgcc code would do for IA64 HP-UX in that case. Ideally there would be generic code to create such built-in functions for all supported floating-point types. That may be something to consider if support for TS 18661-3 (standard bindings for IEEE 754-2008, defining names such as _Float128, and function names such as copysignf128) is added in future. Bootstrapped with no regressions on x86_64-unknown-linux-gnu. gcc: * system.h (LIBGCC2_TF_CEXT): Poison. * config/i386/cygming.h (LIBGCC2_TF_CEXT): Remove. * config/i386/darwin.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/dragonfly.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/freebsd.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/gnu-user-common.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/openbsdelf.h (LIBGCC2_TF_CEXT): Likewise. * config/i386/sol2.h (LIBGCC2_TF_CEXT): Likewise. * config/ia64/ia64.h (LIBGCC2_TF_CEXT): Likewise. * config/ia64/linux.h (LIBGCC2_TF_CEXT): Likewise. gcc/c-family: * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__ for supported floating-point modes. libgcc: * libgcc2.c (CEXT): Define using __LIBGCC_*_FUNC_EXT__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@215368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc/libgcc2.c')
-rw-r--r--libgcc/libgcc2.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/libgcc/libgcc2.c b/libgcc/libgcc2.c
index 2800fe949e2..dc8a235e8b8 100644
--- a/libgcc/libgcc2.c
+++ b/libgcc/libgcc2.c
@@ -1865,34 +1865,29 @@ NAME (TYPE x, int m)
# define MTYPE SFtype
# define CTYPE SCtype
# define MODE sc
-# define CEXT f
+# define CEXT __LIBGCC_SF_FUNC_EXT__
# define NOTRUNC __FLT_EVAL_METHOD__ == 0
#elif defined(L_muldc3) || defined(L_divdc3)
# define MTYPE DFtype
# define CTYPE DCtype
# define MODE dc
+# define CEXT __LIBGCC_DF_FUNC_EXT__
# if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 64
-# define CEXT l
# define NOTRUNC 1
# else
-# define CEXT
# define NOTRUNC __FLT_EVAL_METHOD__ == 0 || __FLT_EVAL_METHOD__ == 1
# endif
#elif defined(L_mulxc3) || defined(L_divxc3)
# define MTYPE XFtype
# define CTYPE XCtype
# define MODE xc
-# define CEXT l
+# define CEXT __LIBGCC_XF_FUNC_EXT__
# define NOTRUNC 1
#elif defined(L_multc3) || defined(L_divtc3)
# define MTYPE TFtype
# define CTYPE TCtype
# define MODE tc
-# if LIBGCC2_LONG_DOUBLE_TYPE_SIZE == 128
-# define CEXT l
-# else
-# define CEXT LIBGCC2_TF_CEXT
-# endif
+# define CEXT __LIBGCC_TF_FUNC_EXT__
# define NOTRUNC 1
#else
# error