On 04/12/14 10:27, Marcus Shawcroft wrote:
On 27 November 2014 at 11:27, Renlin Li <renlin...@arm.com> wrote:

gcc/ChangeLog:

2014-11-27  Renlin Li  <renlin...@arm.com>

     * config/aarch64/aarch64.c (aarch64_parse_cpu): Don't define
selected_tune.
     (aarch64_override_options): Use selected_cpu's tuning.

OK and this is also broken in 4.9, could you prepare a backport please. /Marcus


This is a backport patch of https://gcc.gnu.org/ml/gcc-patches/2014-12/msg00287.html

aarch64-none-elf has been built and tested on the model, no issue.
Okay for branch 4.9?

Regards,
Renlin Li


gcc/ChangeLog:

2014-12-10 Renlin Li <renlin...@arm.com>

* config/aarch64/aarch64.c (aarch64_parse_cpu): Remove selected_tune
        assignment as this will be done later.
        (aarch64_override_options): Use selected_cpu's tuning.
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 1809513..0a8c303 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -6613,7 +6613,6 @@ aarch64_parse_cpu (void)
       if (strlen (cpu->name) == len && strncmp (cpu->name, str, len) == 0)
 	{
 	  selected_cpu = cpu;
-	  selected_tune = cpu;
 	  aarch64_isa_flags = selected_cpu->flags;
 
 	  if (ext != NULL)
@@ -6709,9 +6708,8 @@ aarch64_override_options (void)
 
   gcc_assert (selected_cpu);
 
-  /* The selected cpu may be an architecture, so lookup tuning by core ID.  */
   if (!selected_tune)
-    selected_tune = &all_cores[selected_cpu->core];
+    selected_tune = selected_cpu;
 
   aarch64_tune_flags = selected_tune->flags;
   aarch64_tune = selected_tune->core;

Reply via email to