aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/i386.c
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-11-05 13:21:36 +0000
committerJoseph Myers <jsm28@gcc.gnu.org>2013-11-05 13:21:36 +0000
commit254a0760a191f53494e0416dadf9607c71b1844f (patch)
treeeffb5cf317fbada14a48899a247e85e16f7325b2 /gcc/config/i386/i386.c
parent4de9c53f028bdf64e1be92fd380ec06d34cf27f8 (diff)
downloadgcc-254a0760a191f53494e0416dadf9607c71b1844f.zip
gcc-254a0760a191f53494e0416dadf9607c71b1844f.tar.gz
gcc-254a0760a191f53494e0416dadf9607c71b1844f.tar.bz2
i386.c (ix86_float_exceptions_rounding_supported_p): New function.
* config/i386/i386.c (ix86_float_exceptions_rounding_supported_p): New function. (TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P): Define. c-family: * c-cppbuiltin.c (cpp_iec_559_value): Test flag_excess_precision_cmdline not flag_excess_precision. From-SVN: r204390
Diffstat (limited to 'gcc/config/i386/i386.c')
-rw-r--r--gcc/config/i386/i386.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 11064d8..771fabe 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -43519,6 +43519,18 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val)
return val;
}
+/* Implement TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P. */
+
+static bool
+ix86_float_exceptions_rounding_supported_p (void)
+{
+ /* For x87 floating point with standard excess precision handling,
+ there is no adddf3 pattern (since x87 floating point only has
+ XFmode operations) so the default hook implementation gets this
+ wrong. */
+ return TARGET_80387 || TARGET_SSE_MATH;
+}
+
/* Initialize the GCC target structure. */
#undef TARGET_RETURN_IN_MEMORY
#define TARGET_RETURN_IN_MEMORY ix86_return_in_memory
@@ -43895,6 +43907,10 @@ ix86_memmodel_check (unsigned HOST_WIDE_INT val)
#undef TARGET_SPILL_CLASS
#define TARGET_SPILL_CLASS ix86_spill_class
+#undef TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P
+#define TARGET_FLOAT_EXCEPTIONS_ROUNDING_SUPPORTED_P \
+ ix86_float_exceptions_rounding_supported_p
+
struct gcc_target targetm = TARGET_INITIALIZER;
#include "gt-i386.h"