summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/target-supports.exp
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-04-29 11:51:03 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2020-04-29 11:51:03 +0100
commit127abeb2e8448b2932bd52245f055d0c5c4b44a0 (patch)
tree9b2e9dec0c4e3a269acb3ba4214fb109b5429fef /gcc/testsuite/lib/target-supports.exp
parente6e616074f02b81c397a2848ab242b54ef21efbc (diff)
arm: Fix parameter passing for [[no_unique_address]]
This patch makes the ABI code ignore zero-sized [[no_unique_address]] fields when deciding whether something is a HFA or HVA. For the tests, I wanted an -march setting that was stable enough to use check-function-bodies and also wanted to force -mfloat-abi=hard. I couldn't see any existing way of doing both together, since most arm-related effective-target keywords are agnostic about the choice between -mfloat-abi=softfp and -mfloat-abi=hard. I therefore added a new effective-target keyword for this combination. I used the arm_arch_* framework for the effective-target rather than writing a new set of custom Tcl routines. This has the nice property of separating the "compile and assemble" cases from the "link and run" cases. I only need compilation to work for the new tests, so requiring linking to work would be an unnecessary restriction. However, including an ABI requirement is arguably stretching what the list was originally intended to handle. The name arm_arch_v8a_hard doesn't fit very naturally with some of the NEON-based tests. On the other hand, the naming convention isn't entirely consistent, so any choice would be inconsistent with something. 2020-04-29 Richard Sandiford <richard.sandiford@arm.com> gcc/ * doc/sourcebuild.texi (arm_arch_v8a_hard_ok): Document new effective-target keyword. (arm_arch_v8a_hard_multilib): Likewise. (arm_arch_v8a_hard): Document new dg-add-options keyword. * config/arm/arm.c (arm_return_in_memory): Note that the APCS code is deprecated and has not been updated to handle DECL_FIELD_ABI_IGNORED. (WARN_PSABI_EMPTY_CXX17_BASE): New constant. (WARN_PSABI_NO_UNIQUE_ADDRESS): Likewise. (aapcs_vfp_sub_candidate): Replace the boolean pointer parameter avoid_cxx17_empty_base with a pointer to a bitmask. Ignore fields whose DECL_FIELD_ABI_IGNORED bit is set when determining whether something actually is a HFA or HVA. Record whether we see a [[no_unique_address]] field that previous GCCs would not have ignored in this way. (aapcs_vfp_is_call_or_return_candidate): Update the calls to aapcs_vfp_sub_candidate and report a -Wpsabi warning for the [[no_unique_address]] case. Use TYPE_MAIN_VARIANT in the diagnostic messages. (arm_needs_doubleword_align): Add a comment explaining why we consider even zero-sized fields. gcc/testsuite/ * lib/target-supports.exp: Add v8a_hard to the list of arm_arch_* targets. * g++.target/arm/no_unique_address_1.C: New test. * g++.target/arm/no_unique_address_2.C: Likewise.
Diffstat (limited to 'gcc/testsuite/lib/target-supports.exp')
-rw-r--r--gcc/testsuite/lib/target-supports.exp1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index f416d5cafda..13761491e63 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -4443,6 +4443,7 @@ foreach { armfunc armflag armdefs } {
v7ve "-march=armv7ve -marm"
"__ARM_ARCH_7A__ && __ARM_FEATURE_IDIV"
v8a "-march=armv8-a" __ARM_ARCH_8A__
+ v8a_hard "-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard" __ARM_ARCH_8A__
v8_1a "-march=armv8.1-a" __ARM_ARCH_8A__
v8_2a "-march=armv8.2-a" __ARM_ARCH_8A__
v8r "-march=armv8-r" __ARM_ARCH_8R__