aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-06-03 06:15:25 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-06-03 06:15:25 +0000
commit30efe578e7df5edf8e370e09e08bc88dcd449792 (patch)
tree025bf16aef30cc6aaf4bd9ba74d1f8bb707830a7
parent8fd0df91d8abc68b73151756f574d3a511120f90 (diff)
downloadgcc-30efe578e7df5edf8e370e09e08bc88dcd449792.zip
gcc-30efe578e7df5edf8e370e09e08bc88dcd449792.tar.gz
gcc-30efe578e7df5edf8e370e09e08bc88dcd449792.tar.bz2
i386.h (TARGET_CPU_CPP_BUILTINS): New.
* config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): New. (CPP_CPU32_SPEC, CPP_CPU64_SPEC): Kill. (CPP_CPUCOMMON_SPEC): Rename CPP_CPU_SPEC. From-SVN: r54206
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.h48
2 files changed, 27 insertions, 27 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0c86de4..4986edb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2002-06-03 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * config/i386/i386.h (TARGET_CPU_CPP_BUILTINS): New.
+ (CPP_CPU32_SPEC, CPP_CPU64_SPEC): Kill.
+ (CPP_CPUCOMMON_SPEC): Rename CPP_CPU_SPEC.
+
2002-06-03 Jason Thorpe <thorpej@wasabisystems.com>
* config/ns32k/netbsd.h: Update copyright years.
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 17f1f23..c7fe8d4 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -473,6 +473,26 @@ extern int x86_prefetch_sse;
%n`-mno-intel-syntax' is deprecated. Use `-masm=att' instead.\n}"
#endif
+/* Target CPU builtins. */
+#define TARGET_CPU_CPP_BUILTINS() \
+ do \
+ { \
+ if (TARGET_64BIT) \
+ { \
+ builtin_assert ("cpu=x86_64"); \
+ builtin_assert ("machine=x86_64"); \
+ builtin_define ("__x86_64"); \
+ builtin_define ("__x86_64__"); \
+ } \
+ else \
+ { \
+ builtin_assert ("cpu=i386"); \
+ builtin_assert ("machine=i386"); \
+ builtin_define_std ("i386"); \
+ } \
+ } \
+ while (0)
+
#define TARGET_CPU_DEFAULT_i386 0
#define TARGET_CPU_DEFAULT_i486 1
#define TARGET_CPU_DEFAULT_pentium 2
@@ -535,14 +555,7 @@ extern int x86_prefetch_sse;
#endif
#endif /* CPP_CPU_DEFAULT_SPEC */
-#define CPP_CPU32_SPEC \
- "-Acpu=i386 -Amachine=i386 %{!ansi:%{!std=c*:%{!std=i*:-Di386}}} -D__i386 \
--D__i386__"
-
-#define CPP_CPU64_SPEC \
- "-Acpu=x86_64 -Amachine=x86_64 -D__x86_64 -D__x86_64__"
-
-#define CPP_CPUCOMMON_SPEC "\
+#define CPP_CPU_SPEC "\
%{march=i386:%{!mcpu*:-D__tune_i386__ }}\
%{march=i486:-D__i486 -D__i486__ %{!mcpu*:-D__tune_i486__ }}\
%{march=pentium|march=i586:-D__i586 -D__i586__ -D__pentium -D__pentium__ \
@@ -589,22 +602,6 @@ extern int x86_prefetch_sse;
%{march=pentium4: -D__SSE2__ }\
%{!march*:%{!mcpu*:%{!m386:%{!m486:%{!mpentium*:%(cpp_cpu_default)}}}}}"
-#ifndef CPP_CPU_SPEC
-#ifdef TARGET_BI_ARCH
-#if TARGET_64BIT_DEFAULT
-#define CPP_CPU_SPEC "%{m32:%(cpp_cpu32)}%{!m32:%(cpp_cpu64)} %(cpp_cpucommon)"
-#else
-#define CPP_CPU_SPEC "%{m64:%(cpp_cpu64)}%{!m64:%(cpp_cpu32)} %(cpp_cpucommon)"
-#endif
-#else
-#if TARGET_64BIT_DEFAULT
-#define CPP_CPU_SPEC "%(cpp_cpu64) %(cpp_cpucommon)"
-#else
-#define CPP_CPU_SPEC "%(cpp_cpu32) %(cpp_cpucommon)"
-#endif
-#endif
-#endif
-
#ifndef CC1_SPEC
#define CC1_SPEC "%(cc1_cpu) "
#endif
@@ -626,9 +623,6 @@ extern int x86_prefetch_sse;
#define EXTRA_SPECS \
{ "cpp_cpu_default", CPP_CPU_DEFAULT_SPEC }, \
{ "cpp_cpu", CPP_CPU_SPEC }, \
- { "cpp_cpu32", CPP_CPU32_SPEC }, \
- { "cpp_cpu64", CPP_CPU64_SPEC }, \
- { "cpp_cpucommon", CPP_CPUCOMMON_SPEC }, \
{ "cc1_cpu", CC1_CPU_SPEC }, \
SUBTARGET_EXTRA_SPECS