diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-04-06 16:43:02 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-04-06 16:43:02 -0700 |
commit | 42fd3e04ccbfbc47c1fddb15d384814637df0636 (patch) | |
tree | e2695726e95b7bd125d52b7bdd315cb0028854fa /gcc/common | |
parent | 00eb71c43c74cc5143b60d470450c3981037ed3c (diff) | |
parent | 52fa80f853c0b0f623ea9e4c7198e324ce44ff30 (diff) | |
download | gcc-42fd3e04ccbfbc47c1fddb15d384814637df0636.zip gcc-42fd3e04ccbfbc47c1fddb15d384814637df0636.tar.gz gcc-42fd3e04ccbfbc47c1fddb15d384814637df0636.tar.bz2 |
Merge from trunk revision 52fa80f853c0b0f623ea9e4c7198e324ce44ff30
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/aarch64/aarch64-common.c | 17 | ||||
-rw-r--r-- | gcc/common/config/arm/arm-common.c | 3 |
2 files changed, 18 insertions, 2 deletions
diff --git a/gcc/common/config/aarch64/aarch64-common.c b/gcc/common/config/aarch64/aarch64-common.c index 8d24c14..0bddcc8 100644 --- a/gcc/common/config/aarch64/aarch64-common.c +++ b/gcc/common/config/aarch64/aarch64-common.c @@ -391,7 +391,22 @@ aarch64_get_extension_string_for_isa_flags (uint64_t isa_flags, /* We remove all the dependent bits, to prevent them from being turned on twice. This only works because we assume that all there are individual options to set all bits standalone. */ - isa_flag_bits &= ~opt->flags_on; + + /* PR target/94396. + + For flags which would already imply a bit that's on by default (e.g + fp16fml which implies +fp,+fp16) we must emit the flags that are not + on by default. i.e. in Armv8.4-a +fp16fml is default if +fp16. So + if a user passes armv8.4-a+fp16 (or +fp16fml) then we need to emit + +fp16. But if +fp16fml is used in an architecture where it is + completely optional we only have to emit the canonical flag. */ + uint64_t toggle_bits = opt->flags_on & default_arch_flags; + /* Now check to see if the canonical flag is on by default. If it + is not then enabling it will enable all bits in flags_on. */ + if ((opt->flag_canonical & default_arch_flags) == 0) + toggle_bits = opt->flags_on; + + isa_flag_bits &= ~toggle_bits; isa_flag_bits |= opt->flag_canonical; } } diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 30a2a1d..78a779c 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -1009,7 +1009,8 @@ arm_asm_auto_mfpu (int argc, const char **argv) } } - gcc_assert (i != TARGET_FPU_auto); + gcc_assert (i != TARGET_FPU_auto + || bitmap_bit_p (target_isa, isa_bit_vfp_base)); } auto_fpu = (char *) xmalloc (strlen (fpuname) + sizeof ("-mfpu=")); |