aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-07-10 19:01:40 +0000
committerDaniel Jacobowitz <drow@gcc.gnu.org>2004-07-10 19:01:40 +0000
commit3326f4101aab4be3befedda3eb52a7d58746aa97 (patch)
tree6c2594c80c5d6eab561b8d693b5b802e5f86f027 /gcc
parent07b8df0a3d66c6198221375616d9685d81a1fc1a (diff)
downloadgcc-3326f4101aab4be3befedda3eb52a7d58746aa97.zip
gcc-3326f4101aab4be3befedda3eb52a7d58746aa97.tar.gz
gcc-3326f4101aab4be3befedda3eb52a7d58746aa97.tar.bz2
i386.c (override_options): Pick a 64-bit CPU for the default tuning if TARGET_64BIT.
* config/i386/i386.c (override_options): Pick a 64-bit CPU for the default tuning if TARGET_64BIT. From-SVN: r84470
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/i386/i386.c22
2 files changed, 25 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e6d9dd8..3ce75e9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-07-10 Daniel Jacobowitz <dan@debian.org>
+
+ * config/i386/i386.c (override_options): Pick a 64-bit CPU
+ for the default tuning if TARGET_64BIT.
+
2004-07-10 Richard Henderson <rth@redhat.com>
* builtins.c (std_gimplify_va_arg_expr): Widen align/boundary
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7d7312c..dafc60a 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1097,6 +1097,8 @@ void
override_options (void)
{
int i;
+ int ix86_tune_defaulted = 0;
+
/* Comes from final.c -- no real reason to change it. */
#define MAX_CODE_ALIGN 16
@@ -1221,7 +1223,10 @@ override_options (void)
if (!ix86_tune_string && ix86_arch_string)
ix86_tune_string = ix86_arch_string;
if (!ix86_tune_string)
- ix86_tune_string = cpu_names [TARGET_CPU_DEFAULT];
+ {
+ ix86_tune_string = cpu_names [TARGET_CPU_DEFAULT];
+ ix86_tune_defaulted = 1;
+ }
if (!ix86_arch_string)
ix86_arch_string = TARGET_64BIT ? "x86-64" : "i386";
@@ -1293,7 +1298,20 @@ override_options (void)
if (processor_alias_table[i].flags & PTA_PREFETCH_SSE)
x86_prefetch_sse = true;
if (TARGET_64BIT && !(processor_alias_table[i].flags & PTA_64BIT))
- error ("CPU you selected does not support x86-64 instruction set");
+ {
+ if (ix86_tune_defaulted)
+ {
+ ix86_tune_string = "x86-64";
+ for (i = 0; i < pta_size; i++)
+ if (! strcmp (ix86_tune_string,
+ processor_alias_table[i].name))
+ break;
+ ix86_tune = processor_alias_table[i].processor;
+ }
+ else
+ error ("CPU you selected does not support x86-64 "
+ "instruction set");
+ }
break;
}