From: James Greenhalgh Date: Mon, 27 Jan 2014 15:51:42 +0000 (+0000) Subject: [ARM] fix big.LITTLE spec rewriting X-Git-Tag: releases/gcc-4.9.0~1336 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84e90123e6f43db35b07d8081fcdcb7fd08cdeda;p=thirdparty%2Fgcc.git [ARM] fix big.LITTLE spec rewriting 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 41dfda350632..8405b2e25a26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-01-27 James Greenhalgh + + * 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 * gimple-builder.h (create_gimple_tmp): Delete. diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 065de7d8d0a3..205d82ab0bc6 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -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 diff --git a/gcc/config/arm/arm.h b/gcc/config/arm/arm.h index b815488db535..bed056e5c2bf 100644 --- a/gcc/config/arm/arm.h +++ b/gcc/config/arm/arm.h @@ -2356,7 +2356,7 @@ extern int making_const_table; #define MAX_LDM_STM_OPS 4 #define BIG_LITTLE_SPEC \ - " %{mcpu=*:%