Skip to content
Snippets Groups Projects
Commit 1be715f3 authored by Wilco Dijkstra's avatar Wilco Dijkstra Committed by Wilco Dijkstra
Browse files

AArch64: Cleanup CPU option processing code

The --with-cpu/--with-arch configure option processing not only checks valid
arguments but also sets TARGET_CPU_DEFAULT with a CPU and extension bitmask.
This isn't used however since a --with-cpu is translated into a -mcpu option
which is processed as if written on the command-line (so TARGET_CPU_DEFAULT
is never accessed).

So remove all the complex processing and bitmask, and just validate the
option. Fix a bug that always reports valid architecture extensions as invalid.
As a result the CPU processing in aarch64.c can be simplified.

gcc/
	* config.gcc (aarch64*-*-*): Simplify --with-cpu and --with-arch
	processing.  Add support for architectural extensions.
	* config/aarch64/aarch64.h (TARGET_CPU_DEFAULT): Remove
	AARCH64_CPU_DEFAULT_FLAGS.
	(TARGET_CPU_NBITS): Remove.
	(TARGET_CPU_MASK): Remove.
	* config/aarch64/aarch64.cc (AARCH64_CPU_DEFAULT_FLAGS): Remove define.
	(get_tune_cpu): Assert CPU is always valid.
	(get_arch): Assert architecture is always valid.
	(aarch64_override_options): Cleanup CPU selection code and simplify logic.
	(aarch64_option_restore): Remove unnecessary checks on tune.
parent ff171cb1
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment