arm: remove error in CPP_SPEC when float-abi soft and hard are used together
authorChristophe Lyon <christophe.lyon@linaro.org>
Mon, 10 May 2021 16:39:04 +0000 (16:39 +0000)
committerChristophe Lyon <christophe.lyon@linaro.org>
Mon, 10 May 2021 16:39:04 +0000 (16:39 +0000)
arm.h has had this error message since 1997, and was never updated to
take softfp into account. Anyway, it seems it was useful long ago, but
it is no longer needed since option parsing has been improved:
-mfloat-abi is handled via arm.opt and updates the var_float_abi
variable. So, the last instance of -mfloat-abi= on the command line
wins.

This patch just removes this error message, thus enabling many more
tests to pass on arm-eabi:

* with -mcpu=cortex-a7/-mfloat-abi=soft/-march=armv7ve+simd (2 more passes)
gcc.target/arm/pr52375.c
g++.target/arm/pr99593.C (test for excess errors)

* with -mthumb/-mfloat-abi=soft/-march=armv6s-m (115 more passes in C, 90 more in C++)
gcc.target/arm/armv8_1m-fp16-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp32-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp64-move-1.c (test for excess errors)
gcc.target/arm/armv8_2-fp16-move-1.c (test for excess errors)
gcc.target/arm/cortex-m55-nodsp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nofp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c (test for excess errors)
g++.target/arm/no_unique_address_1.C
g++.target/arm/no_unique_address_2.C

* with -mthumb/-mfloat-abi=soft/-march=armv7-m (153 more passes in C, 90 more in C++)
gcc.dg/pr59418.c (test for excess errors)
gcc.target/arm/armv8_1m-fp16-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp32-move-1.c (test for excess errors)
gcc.target/arm/armv8_1m-fp64-move-1.c (test for excess errors)
gcc.target/arm/armv8_2-fp16-move-1.c (test for excess errors)
gcc.target/arm/bfloat16_scalar_2_1.c (test for excess errors)
gcc.target/arm/bfloat16_scalar_3_1.c (test for excess errors)
gcc.target/arm/cortex-m55-nodsp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nofp-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve-flag-hard.c (test for excess errors)
gcc.target/arm/cortex-m55-nomve.fp-flag-hard.c (test for excess errors)
gcc.target/arm/pr52375.c (test for excess errors)
gcc.target/arm/simd/vld1_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vldn_lane_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vst1_bf16_1.c (test for excess errors)
gcc.target/arm/simd/vstn_lane_bf16_1.c (test for excess errors)
g++.target/arm/no_unique_address_1.C
g++.target/arm/no_unique_address_2.C

* with -mthumb/-mfloat-abi=hard/-march=armv7e-m+fp (65 more passes)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times ldaex 4
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times stlex 4
gcc.target/arm/atomic-op-acq_rel-3.c (test for excess errors)
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c (test for excess errors)
gcc.target/arm/atomic-op-char-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-char-3.c scan-assembler-times ldrexb\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c scan-assembler-times strexb\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c (test for excess errors)
gcc.target/arm/atomic-op-consume-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c (test for excess errors)
gcc.target/arm/atomic-op-int-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-int-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c (test for excess errors)
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c (test for excess errors)
gcc.target/arm/atomic-op-release-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-release-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c (test for excess errors)
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c (test for excess errors)
gcc.target/arm/atomic-op-short-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-short-3.c scan-assembler-times ldrexh\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c scan-assembler-times strexh\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/builtin-bswap-2.c (test for excess errors)
gcc.target/arm/builtin-bswap-2.c scan-assembler-not orr[ \t]
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev16\\t 2
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev\\t 4
gcc.target/arm/builtin-bswap-2.c scan-assembler-times revsh\\t 2
gcc.target/arm/builtin-bswap16-2.c (test for excess errors)
gcc.target/arm/builtin-bswap16-2.c scan-assembler-not orr[ \t]
gcc.target/arm/pr89190.c (test for excess errors)
gcc.target/arm/pr95646.c (test for excess errors)
gcc.target/arm/pr95646.c check-function-bodies __acle_se_bar
gcc.target/arm/pr95646.c scan-assembler-not mov\tr9, r0

* with -mthumb/-mfloat-abi=hard/-march=armv8-m.main+fp+dsp (870 more passes)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times ldaex 4
gcc.target/arm/atomic-comp-swap-release-acquire-3.c scan-assembler-times stlex 4
gcc.target/arm/atomic-op-acq_rel-3.c (test for excess errors)
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acq_rel-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c (test for excess errors)
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-acquire-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c (test for excess errors)
gcc.target/arm/atomic-op-char-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-char-3.c scan-assembler-times ldrexb\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-char-3.c scan-assembler-times strexb\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c (test for excess errors)
gcc.target/arm/atomic-op-consume-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-consume-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c (test for excess errors)
gcc.target/arm/atomic-op-int-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-int-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-int-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c (test for excess errors)
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-relaxed-3.c scan-assembler-times strex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c (test for excess errors)
gcc.target/arm/atomic-op-release-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-release-3.c scan-assembler-times ldrex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-release-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c (test for excess errors)
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times ldaex\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-seq_cst-3.c scan-assembler-times stlex\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c (test for excess errors)
gcc.target/arm/atomic-op-short-3.c scan-assembler-not dmb
gcc.target/arm/atomic-op-short-3.c scan-assembler-times ldrexh\tr[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/atomic-op-short-3.c scan-assembler-times strexh\t...?, r[0-9]+, \\[r[0-9]+\\] 6
gcc.target/arm/builtin-bswap-2.c (test for excess errors)
gcc.target/arm/builtin-bswap-2.c scan-assembler-not orr[ \t]
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev16\\t 2
gcc.target/arm/builtin-bswap-2.c scan-assembler-times rev\\t 4
gcc.target/arm/builtin-bswap-2.c scan-assembler-times revsh\\t 2
gcc.target/arm/builtin-bswap16-2.c (test for excess errors)
gcc.target/arm/builtin-bswap16-2.c scan-assembler-not orr[ \t]
gcc.target/arm/pr89190.c (test for excess errors)
gcc.target/arm/pr95646.c (test for excess errors)
gcc.target/arm/pr95646.c check-function-bodies __acle_se_bar
gcc.target/arm/pr95646.c scan-assembler-not mov\tr9, r0

and all cmse tests

2021-05-10  Christophe Lyon  <christophe.lyon@linaro.org>

gcc/
* config/arm/arm.h (CPP_SPEC): Remove error message about
-mfloat-abi.

gcc/config/arm/arm.h

index c70af57..e430e4d 100644 (file)
@@ -90,8 +90,6 @@ extern tree arm_bf16_ptr_type_node;
 \f
 #undef  CPP_SPEC
 #define CPP_SPEC "%(subtarget_cpp_spec)                                        \
-%{mfloat-abi=soft:%{mfloat-abi=hard:                                   \
-       %e-mfloat-abi=soft and -mfloat-abi=hard may not be used together}} \
 %{mbig-endian:%{mlittle-endian:                                                \
        %e-mbig-endian and -mlittle-endian may not be used together}}"