This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch AArch64 0/3] Fix PR70133


Hi,

This patch set fixes PR70133, which is a bug in the way we handle extension
strings after using -march or -mcpu=native. In investigating this, I found
other bugs in the way we communicate architceture intention between the
compiler and the assembler.

This patch set cleans this up somewhat.

Tested on a Cortex-A57 based board, a Cortex-A57/Cortex-A53 big.LITTLE
based board, a Cortex-A72/Cortex-A53 big.LITTLE based board and an xgene1
based board. I don't have access to the board in the bug report, but I fed
representative data to the detection code to check that worked too.

The patch set goes as follows...

[Patch AArch64 1/3] Enable CRC by default for armv8.1-a

  The assmebler will enable CRC by default for -march=armv8.1-a, and we should
  follow that expectation in GCC.

[Patch AArch64 2/3] Rework the code to print extension strings (pr70133)

  There are a number of bugs that come from the way we enable and disable
  extension strings. Rework this code so we always put out a safe and minimal
  set of flags for a -march/-mcpu input.

[Patch AArch64 3/3] Fix up for pr70133

  Use the infratructure added in 2/3 to fix the PR.

OK for trunk?

Thanks,
James

---
[Patch AArch64 1/3] Enable CRC by default for armv8.1-a

2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>

	* config/aarch64/aarch64.h (AARCH64_FL_FOR_ARCH8_1): Also add
	AARCH64_FL_CRC.


[Patch AArch64 2/3] Rework the code to print extension strings (pr70133)

gcc/

2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>

	PR target/70133
	* config/aarch64/aarch64-common.c (aarch64_option_extension): Keep
	track of a canonical flag name.
	(all_extensions): Likewise.
	(arch_to_arch_name): Also track extension flags enabled by the arch.
	(all_architectures): Likewise.
	(aarch64_parse_extension): Move to here.
	(aarch64_get_extension_string_for_isa_flags): Take a new argument,
	rework.
	(aarch64_rewrite_selected_cpu): Update for above change.
	* config/aarch64/aarch64-option-extensions.def: Rework the way flags
	are handled, such that the single explicit value enabled by an
	extension is kept seperate from the implicit values it also enables.
	* config/aarch64/aarch64-protos.h (aarch64_parse_opt_result): Move
	to here.
	(aarch64_parse_extension): New.
	* config/aarch64/aarch64.c (aarch64_parse_opt_result): Move from
	here to config/aarch64/aarch64-protos.h.
	(aarch64_parse_extension): Move from here to
	common/config/aarch64/aarch64-common.c.
	(aarch64_option_print): Update.
	(aarch64_declare_function_name): Likewise.
	(aarch64_start_file): Likewise.
	* config/aarch64/driver-aarch64.c (arch_extension): Keep track of
	the canonical flag for extensions.
	* config.gcc (aarch64*-*-*): Extend regex for capturing extension
	flags.

gcc/testsuite/

2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>

	PR target/70133
	* gcc.target/aarch64/mgeneral-regs_4.c: Fix expected output.
	* gcc.target/aarch64/target_attr_15.c: Likewise.

[Patch AArch64 3/3] Fix up for pr70133

2016-04-06  James Greenhalgh  <james.greenhalgh@arm.com>

	PR target/70133

	* config/aarch64/driver-aarch64.c
	(aarch64_get_extension_string_for_isa_flags): New.
	(arch_extension): Rename to...
	(aarch64_arch_extension): ...This.
	(ext_to_feat_string): Rename to...
	(aarch64_extensions): ...This.
	(aarch64_core_data): Keep track of architecture extension flags.
	(cpu_data): Rename to...
	(aarch64_cpu_data): ...This.
	(aarch64_arch_driver_info): Keep track of architecture extension
	flags.
	(get_arch_name_from_id): Rename to...
	(get_arch_from_id): ...This, change return type.
	(host_detect_local_cpu): Update and reformat for renames, handle
	extensions through common infrastructure.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]