aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJames Greenhalgh <james.greenhalgh@arm.com>2016-04-11 10:14:59 +0000
committerJames Greenhalgh <jgreenhalgh@gcc.gnu.org>2016-04-11 10:14:59 +0000
commit04a99ebecee885e42e56b6e0c832570e2a91c196 (patch)
treeaf54bbd8e515f6707e7b7eff6e5bfda5a7b48a79 /gcc/config.gcc
parenta60fd657ad8290d9916082dd8a31bd4b830c5e5f (diff)
downloadgcc-04a99ebecee885e42e56b6e0c832570e2a91c196.zip
gcc-04a99ebecee885e42e56b6e0c832570e2a91c196.tar.gz
gcc-04a99ebecee885e42e56b6e0c832570e2a91c196.tar.bz2
[Patch AArch64 2/3] Rework the code to print extension strings (pr70133)
gcc/ 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/ PR target/70133 * gcc.target/aarch64/mgeneral-regs_4.c: Fix expected output. * gcc.target/aarch64/target_attr_15.c: Likewise. From-SVN: r234876
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6722260..f66e48c 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3620,22 +3620,28 @@ case "${target}" in
${srcdir}/config/aarch64/aarch64-option-extensions.def \
> /dev/null; then
- ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+ ext_canon=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def | \
sed -e 's/^[^,]*,[ ]*//' | \
sed -e 's/,.*$//'`
- ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+ ext_on=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
${srcdir}/config/aarch64/aarch64-option-extensions.def | \
sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*//' | \
sed -e 's/,.*$//' | \
sed -e 's/).*$//'`
+ ext_off=`grep "^AARCH64_OPT_EXTENSION(\"$base_ext\"," \
+ ${srcdir}/config/aarch64/aarch64-option-extensions.def | \
+ sed -e 's/^[^,]*,[ ]*[^,]*,[ ]*[^,]*,[ ]*//' | \
+ sed -e 's/,.*$//' | \
+ sed -e 's/).*$//'`
+
if [ $ext = $base_ext ]; then
# Adding extension
- ext_mask="("$ext_mask") | ("$ext_on")"
+ ext_mask="("$ext_mask") | ("$ext_on" | "$ext_canon")"
else
# Removing extension
- ext_mask="("$ext_mask") & ~("$ext_off")"
+ ext_mask="("$ext_mask") & ~("$ext_off" | "$ext_canon")"
fi
true