aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/rs6000/rs6000.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index a12df83..dab026a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
2017-12-07 Segher Boessenkool <segher@kernel.crashing.org>
+ PR target/43871
+ * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
+ rs6000_cpu to the given -mcpu=, or to the default processor.
+
+2017-12-07 Segher Boessenkool <segher@kernel.crashing.org>
+
* config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
* config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
instead of rs6000_cpu_attr.
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index f4028f1..83aa428 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -4184,8 +4184,11 @@ rs6000_option_override_internal (bool global_init_p)
}
}
- gcc_assert (tune_index >= 0);
- rs6000_cpu = processor_target_table[tune_index].processor;
+ if (cpu_index >= 0)
+ rs6000_cpu = processor_target_table[cpu_index].processor;
+ else
+ rs6000_cpu = TARGET_POWERPC64 ? PROCESSOR_DEFAULT64 : PROCESSOR_DEFAULT;
+
gcc_assert (tune_index >= 0);
rs6000_tune = processor_target_table[tune_index].processor;