summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 17:14:35 +0000
committerjgreenhalgh <jgreenhalgh@138bc75d-0d04-0410-961f-82ee72b054a4>2014-01-24 17:14:35 +0000
commit5f2733972432df115955d7af99471c114bc6d210 (patch)
tree6669f106b2ab9fa2fb0589c7c2661c9dabc647a2
parentace0bfb65968d3a72571adef97321967a7328b77 (diff)
downloadppe42-gcc-5f2733972432df115955d7af99471c114bc6d210.tar.gz
ppe42-gcc-5f2733972432df115955d7af99471c114bc6d210.zip
[AArch64] fix big.LITTLE spec rewriting
gcc/ * common/config/aarch64/aarch64-common.c (aarch64_rewrite_mcpu): Handle multiple names. * config/aarch64/aarch64.h (BIG_LITTLE_SPEC): Do not discard mcpu switches. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207053 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/common/config/aarch64/aarch64-common.c8
-rw-r--r--gcc/config/aarch64/aarch64.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7feb332d94b..baf3bd69354 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2014-01-24 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * common/config/aarch64/aarch64-common.c
+ (aarch64_rewrite_mcpu): Handle multiple names.
+ * config/aarch64/aarch64.h
+ (BIG_LITTLE_SPEC): Do not discard mcpu switches.
+
2014-01-24 Dodji Seketeli <dodji@redhat.com>
* input.c (add_file_to_cache_tab): Handle the case where fopen
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c
index 6107007ed41..e44b40a1754 100644
--- a/gcc/common/config/aarch64/aarch64-common.c
+++ b/gcc/common/config/aarch64/aarch64-common.c
@@ -110,13 +110,15 @@ aarch64_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 commend 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 *
aarch64_rewrite_mcpu (int argc, const char **argv)
{
- gcc_assert (argc == 1);
- return aarch64_rewrite_selected_cpu (argv[0]);
+ gcc_assert (argc);
+ return aarch64_rewrite_selected_cpu (argv[argc - 1]);
}
#undef AARCH64_CPU_NAME_LENGTH
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index a08dee0532f..13c424c298d 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -857,7 +857,7 @@ extern enum aarch64_code_model aarch64_cmodel;
(BYTES_BIG_ENDIAN ? GET_MODE_NUNITS (mode) - 1 - n : n)
#define BIG_LITTLE_SPEC \
- " %{mcpu=*:%<mcpu=* -mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}"
+ " %{mcpu=*:-mcpu=%:rewrite_mcpu(%{mcpu=*:%*})}"
extern const char *aarch64_rewrite_mcpu (int argc, const char **argv);
#define BIG_LITTLE_CPU_SPEC_FUNCTIONS \
OpenPOWER on IntegriCloud