Commit 1c05df59 by James Greenhalgh Committed by James Greenhalgh

[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.

From-SVN: r207053
parent 5f36e00f
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
......
......@@ -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
......
......@@ -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 \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment