[ARM] fix big.LITTLE spec rewriting
authorJames Greenhalgh <james.greenhalgh@arm.com>
Mon, 27 Jan 2014 15:51:42 +0000 (15:51 +0000)
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>
Mon, 27 Jan 2014 15:51:42 +0000 (15:51 +0000)
gcc/

* common/config/arm/arm-common.c
(arm_rewrite_mcpu): Handle multiple names.
* config/arm/arm.h
(BIG_LITTLE_SPEC): Do not discard mcpu switches.

From-SVN: r207133

gcc/ChangeLog
gcc/common/config/arm/arm-common.c
gcc/config/arm/arm.h

index 41dfda3..8405b2e 100644 (file)
@@ -1,5 +1,12 @@
 2014-01-27  James Greenhalgh  <james.greenhalgh@arm.com>
 
+       * common/config/arm/arm-common.c
+       (arm_rewrite_mcpu): Handle multiple names.
+       * config/arm/arm.h
+       (BIG_LITTLE_SPEC): Do not discard mcpu switches.
+
+2014-01-27  James Greenhalgh  <james.greenhalgh@arm.com>
+
        * gimple-builder.h (create_gimple_tmp): Delete.
 
 2014-01-27  Christian Bruel  <christian.bruel@st.com>
index 065de7d..205d82a 100644 (file)
@@ -86,13 +86,15 @@ arm_rewrite_selected_cpu (const char *name)
 
 /* Called by the driver to rewrite a name passed to the -mcpu
    argument in preparation to be passed to the assembler.  The
-   name will be in ARGV[0], ARGC should always be 1.  */
+   names passed from the command line will be in ARGV, we want
+   to use the right-most argument, which should be in
+   ARGV[ARGC - 1].  ARGC should always be greater than 0.  */
 
 const char *
 arm_rewrite_mcpu (int argc, const char **argv)
 {
-  gcc_assert (argc == 1);
-  return arm_rewrite_selected_cpu (argv[0]);
+  gcc_assert (argc);
+  return arm_rewrite_selected_cpu (argv[argc - 1]);
 }
 
 #undef ARM_CPU_NAME_LENGTH
index b815488..bed056e 100644 (file)
@@ -2356,7 +2356,7 @@ extern int making_const_table;
 #define MAX_LDM_STM_OPS 4
 
 #define BIG_LITTLE_SPEC \
-   " %{mcpu=*:%<mcpu=* -mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}" \
+   " %{mcpu=*:-mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}"
 
 extern const char *arm_rewrite_mcpu (int argc, const char **argv);
 #define BIG_LITTLE_CPU_SPEC_FUNCTIONS \