From ec0641f612862498e829fdaf040a201c0ba68762 Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 25 Nov 2004 02:05:21 +0000 Subject: [PATCH] i386.c (override_options): Disable x87 fancy math intrinsics if -mfpmath= doesn't include 387 (default on... * config/i386/i386.c (override_options): Disable x87 fancy math intrinsics if -mfpmath= doesn't include 387 (default on x86_64). From-SVN: r91267 --- gcc/ChangeLog | 5 +++++ gcc/config/i386/i386.c | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5f5865c22dc7..7aad684894f6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-11-24 Roger Sayle + + * config/i386/i386.c (override_options): Disable x87 fancy math + intrinsics if -mfpmath= doesn't include 387 (default on x86_64). + 2004-11-24 Roger Sayle * configure.ac: Tweak test for HAVE_DECL_LDGETNAME to avoid a diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 77cb09ff4ba4..a3d2f2806d2a 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -1545,6 +1545,10 @@ override_options (void) error ("bad value (%s) for -mfpmath= switch", ix86_fpmath_string); } + /* If fpmath doesn't include 387, disable use of x87 intrinsics. */ + if (! (ix86_fpmath & FPMATH_387)) + target_flags |= MASK_NO_FANCY_MATH_387; + /* It makes no sense to ask for just SSE builtins, so MMX is also turned on by -msse. */ if (TARGET_SSE) -- 2.43.5