aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorGeoffrey Keating <geoffk@apple.com>2005-04-12 01:46:38 +0000
committerGeoffrey Keating <geoffk@gcc.gnu.org>2005-04-12 01:46:38 +0000
commit004d3859e9793a45c7254a64e4c84b9b9b81101b (patch)
tree4bd062a1014896dc831ea2af7c73bae2e1723bdf /gcc/config
parent92b0bb67877046d21c1b208410f38081c82ff862 (diff)
downloadgcc-004d3859e9793a45c7254a64e4c84b9b9b81101b.zip
gcc-004d3859e9793a45c7254a64e4c84b9b9b81101b.tar.gz
gcc-004d3859e9793a45c7254a64e4c84b9b9b81101b.tar.bz2
i386.h (TARGET_FPMATH_DEFAULT): New.
* config/i386/i386.h (TARGET_FPMATH_DEFAULT): New. * config/i386/darwin.h (TARGET_FPMATH_DEFAULT): New. * config/i386/i386.c (override_options): Use TARGET_FPMATH_DEFAULT. * config/i386/darwin.h (ASM_SPEC): Use -arch i386 not -arch i686. (SUBTARGET_EXTRA_SPECS): Always 'i386'. From-SVN: r98001
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/darwin.h12
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/config/i386/i386.h5
3 files changed, 14 insertions, 9 deletions
diff --git a/gcc/config/i386/darwin.h b/gcc/config/i386/darwin.h
index 7d16c36..b526e22 100644
--- a/gcc/config/i386/darwin.h
+++ b/gcc/config/i386/darwin.h
@@ -1,5 +1,5 @@
/* Target definitions for x86 running Darwin.
- Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
Contributed by Apple Computer Inc.
This file is part of GCC.
@@ -25,6 +25,9 @@ Boston, MA 02111-1307, USA. */
#define TARGET_VERSION fprintf (stderr, " (i686 Darwin)");
+#undef TARGET_FPMATH_DEFAULT
+#define TARGET_FPMATH_DEFAULT (TARGET_SSE ? FPMATH_SSE : FPMATH_387)
+
#define TARGET_OS_CPP_BUILTINS() \
do \
{ \
@@ -43,13 +46,12 @@ Boston, MA 02111-1307, USA. */
%{g: %{!fno-eliminate-unused-debug-symbols: -feliminate-unused-debug-symbols }}"
#undef ASM_SPEC
-#define ASM_SPEC "-arch i686 -force_cpusubtype_ALL"
+#define ASM_SPEC "-arch i386 -force_cpusubtype_ALL"
#undef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS \
- { "darwin_arch", "i686" }, \
- { "darwin_subarch", "%{march=pentium3:pentIIm3;:i686}" },
-
+ { "darwin_arch", "i386" }, \
+ { "darwin_subarch", "i386" },
/* Use the following macro for any Darwin/x86-specific command-line option
translation. */
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9634ff4..b567069 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1516,19 +1516,17 @@ override_options (void)
target_flags
|= ((MASK_SSE2 | MASK_SSE | MASK_MMX | MASK_128BIT_LONG_DOUBLE)
& ~target_flags_explicit);
-
- if (TARGET_SSE)
- ix86_fpmath = FPMATH_SSE;
}
else
{
- ix86_fpmath = FPMATH_387;
/* i386 ABI does not specify red zone. It still makes sense to use it
when programmer takes care to stack from being destroyed. */
if (!(target_flags_explicit & MASK_NO_RED_ZONE))
target_flags |= MASK_NO_RED_ZONE;
}
+ ix86_fpmath = TARGET_FPMATH_DEFAULT;
+
if (ix86_fpmath_string != 0)
{
if (! strcmp (ix86_fpmath_string, "387"))
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index ffba1d7..20bd099 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -104,6 +104,11 @@ extern int target_flags;
#endif
#endif
+#ifndef TARGET_FPMATH_DEFAULT
+#define TARGET_FPMATH_DEFAULT \
+ (TARGET_64BIT && TARGET_SSE ? FPMATH_SSE : FPMATH_387)
+#endif
+
/* Masks for the -m switches */
#define MASK_80387 0x00000001 /* Hardware floating point */
#define MASK_RTD 0x00000002 /* Use ret that pops args */