aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2016-08-26 12:13:42 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2016-08-26 12:13:42 +0100
commit21184026d5e37878304c421cba6649fbc44f1b7c (patch)
tree95d37af364be947cd1503f495a39dd53a9da19a5 /gcc
parent4d1d8d6af37778f9d896285ca5185d07ca2c3450 (diff)
downloadgcc-21184026d5e37878304c421cba6649fbc44f1b7c.zip
gcc-21184026d5e37878304c421cba6649fbc44f1b7c.tar.gz
gcc-21184026d5e37878304c421cba6649fbc44f1b7c.tar.bz2
Always support float128 on x86.
In <https://gcc.gnu.org/ml/gcc-bugs/2016-08/msg03233.html>, Nick reported i386-elf and ia64-elf failing to build because of float128_type_node being NULL, but being used by the back end for __float128. The global float128_type_node is only available conditionally, if target hooks indicate TFmode is not only available as a scalar mode and of the right format, but also supported in libgcc. The back-end support, however, expects the type always to be available for __float128 even if the libgcc support is missing. Although a target-specific node could be restored in the case where libgcc support is missing, it seems better to address the missing libgcc support. Thus, this patch enables TFmode soft-fp in libgcc globally for all x86 targets - the only special cases needed being for targets that use soft-fp for SFmode and DFmode, one of which already had the support for TFmode as well (so I based the i[34567]86-*-rtems* configuration on that present for i[34567]86-*-elfiamcu). The i386 implementation of TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P is then removed as no longer needed. I can provide such a patch for ia64 if useful, but am not in a position to test it (and while I'm reasonably confident that enabling this support would be right for ia64-elf and ia64-freebsd, I've no real idea if enabling libgcc support for TFmode, with or without also enabling it for XFmode, would be safe for ia64-vms). Bootstrapped with no regressions on x86_64-pc-linux-gnu. gcc: * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p) (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove. * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Likewise. * config/i386/vxworks.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise. libgcc: * config.host (i[34567]86-*-* | x86_64-*-*): Enable TFmode soft-fp where not already enabled. From-SVN: r239775
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog14
-rw-r--r--gcc/config/i386/i386.c29
-rw-r--r--gcc/config/i386/i386elf.h2
-rw-r--r--gcc/config/i386/lynx.h2
-rw-r--r--gcc/config/i386/netbsd-elf.h2
-rw-r--r--gcc/config/i386/netbsd64.h2
-rw-r--r--gcc/config/i386/nto.h2
-rw-r--r--gcc/config/i386/openbsd.h2
-rw-r--r--gcc/config/i386/rtemself.h2
-rw-r--r--gcc/config/i386/vxworks.h2
10 files changed, 14 insertions, 45 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index dc3cb73..e8917e3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,17 @@
+2016-08-26 Joseph Myers <joseph@codesourcery.com>
+
+ * config/i386/i386.c (ix86_libgcc_floating_mode_supported_p)
+ (TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P): Remove.
+ * config/i386/i386elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/lynx.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/netbsd-elf.h (IX86_MAYBE_NO_LIBGCC_TFMODE):
+ Likewise.
+ * config/i386/netbsd64.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/nto.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/openbsd.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/rtemself.h (IX86_NO_LIBGCC_TFMODE): Likewise.
+ * config/i386/vxworks.h (IX86_MAYBE_NO_LIBGCC_TFMODE): Likewise.
+
2016-08-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/70473
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8c426ff..3b8b93d9 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -43284,31 +43284,6 @@ ix86_vector_mode_supported_p (machine_mode mode)
return false;
}
-/* Implement target hook libgcc_floating_mode_supported_p. */
-static bool
-ix86_libgcc_floating_mode_supported_p (machine_mode mode)
-{
- switch (mode)
- {
- case SFmode:
- case DFmode:
- case XFmode:
- return true;
-
- case TFmode:
-#ifdef IX86_NO_LIBGCC_TFMODE
- return false;
-#elif defined IX86_MAYBE_NO_LIBGCC_TFMODE
- return TARGET_LONG_DOUBLE_128;
-#else
- return true;
-#endif
-
- default:
- return false;
- }
-}
-
/* Target hook for c_mode_for_suffix. */
static machine_mode
ix86_c_mode_for_suffix (char suffix)
@@ -50568,10 +50543,6 @@ ix86_addr_space_zero_address_valid (addr_space_t as)
#undef TARGET_VECTOR_MODE_SUPPORTED_P
#define TARGET_VECTOR_MODE_SUPPORTED_P ix86_vector_mode_supported_p
-#undef TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P
-#define TARGET_LIBGCC_FLOATING_MODE_SUPPORTED_P \
- ix86_libgcc_floating_mode_supported_p
-
#undef TARGET_C_MODE_FOR_SUFFIX
#define TARGET_C_MODE_FOR_SUFFIX ix86_c_mode_for_suffix
diff --git a/gcc/config/i386/i386elf.h b/gcc/config/i386/i386elf.h
index e2a6a10..b93ef66 100644
--- a/gcc/config/i386/i386elf.h
+++ b/gcc/config/i386/i386elf.h
@@ -101,5 +101,3 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_OUTPUT_ALIGNED_BSS
#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \
asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN)
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/lynx.h b/gcc/config/i386/lynx.h
index 6c4fec6..bb9e17a 100644
--- a/gcc/config/i386/lynx.h
+++ b/gcc/config/i386/lynx.h
@@ -85,5 +85,3 @@ along with GCC; see the file COPYING3. If not see
TLS is detected by configure. We undefine it here. */
#undef HAVE_AS_TLS
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/netbsd-elf.h b/gcc/config/i386/netbsd-elf.h
index a666820..fb59b32 100644
--- a/gcc/config/i386/netbsd-elf.h
+++ b/gcc/config/i386/netbsd-elf.h
@@ -119,5 +119,3 @@ along with GCC; see the file COPYING3. If not see
#define DEFAULT_PCC_STRUCT_RETURN 1
#define HAVE_ENABLE_EXECUTE_STACK
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/netbsd64.h b/gcc/config/i386/netbsd64.h
index d1e2925..315e993 100644
--- a/gcc/config/i386/netbsd64.h
+++ b/gcc/config/i386/netbsd64.h
@@ -67,5 +67,3 @@ along with GCC; see the file COPYING3. If not see
}
#define HAVE_ENABLE_EXECUTE_STACK
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/nto.h b/gcc/config/i386/nto.h
index 1866cf7..42433e9 100644
--- a/gcc/config/i386/nto.h
+++ b/gcc/config/i386/nto.h
@@ -103,5 +103,3 @@ crti.o%s \
#define TARGET_POSIX_IO
#undef DBX_REGISTER_NUMBER
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/openbsd.h b/gcc/config/i386/openbsd.h
index 325f1b9..15aee25 100644
--- a/gcc/config/i386/openbsd.h
+++ b/gcc/config/i386/openbsd.h
@@ -99,5 +99,3 @@ along with GCC; see the file COPYING3. If not see
#undef ASM_QUAD
#define TARGET_HAVE_NAMED_SECTIONS false
-
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h
index 8b7dc5e..21b2173 100644
--- a/gcc/config/i386/rtemself.h
+++ b/gcc/config/i386/rtemself.h
@@ -31,5 +31,3 @@ along with GCC; see the file COPYING3. If not see
#undef LONG_DOUBLE_TYPE_SIZE
#define LONG_DOUBLE_TYPE_SIZE (TARGET_80387 ? 80 : 64)
-
-#define IX86_NO_LIBGCC_TFMODE
diff --git a/gcc/config/i386/vxworks.h b/gcc/config/i386/vxworks.h
index d92510e..b4f0d91b 100644
--- a/gcc/config/i386/vxworks.h
+++ b/gcc/config/i386/vxworks.h
@@ -87,8 +87,6 @@ along with GCC; see the file COPYING3. If not see
fixed gap between segments. */
#undef ASM_PREFERRED_EH_DATA_FORMAT
-#define IX86_MAYBE_NO_LIBGCC_TFMODE
-
/* Define this to be nonzero if static stack checking is supported. */
#define STACK_CHECK_STATIC_BUILTIN 1