summaryrefslogtreecommitdiff
path: root/gcc/doc
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/doc
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/doc')
-rw-r--r--gcc/doc/sourcebuild.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index b69612024be..d8da77d5ba4 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1829,6 +1829,16 @@ Some multilibs may be incompatible with these options.
ARM target supports @code{-mfpu=vfp3 -mfloat-abi=softfp}.
Some multilibs may be incompatible with these options.
+@item arm_arch_v8a_hard_ok
+The compiler is targeting @code{arm*-*-*} and can compile and assemble code
+using the options @code{-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard}.
+This is not enough to guarantee that linking works.
+
+@item arm_arch_v8a_hard_multilib
+The compiler is targeting @code{arm*-*-*} and can build programs using
+the options @code{-march=armv8-a -mfpu=neon-fp-armv8 -mfloat-abi=hard}.
+The target can also run the resulting binaries.
+
@item arm_v8_vfp_ok
ARM target supports @code{-mfpu=fp-armv8 -mfloat-abi=softfp}.
Some multilibs may be incompatible with these options.
@@ -2586,6 +2596,11 @@ the @ref{arm_neon_fp16_ok,,arm_neon_fp16_ok effective target keyword}.
arm vfp3 floating point support; see
the @ref{arm_vfp3_ok,,arm_vfp3_ok effective target keyword}.
+@item arm_arch_v8a_hard
+Add options for ARMv8-A and the hard-float variant of the AAPCS,
+if this is supported by the compiler; see the
+@ref{arm_arch_v8a_hard_ok,,arm_arch_v8a_hard_ok} effective target keyword.
+
@item arm_v8_1a_neon
Add options for ARMv8.1-A with Adv.SIMD support, if this is supported
by the target; see the @ref{arm_v8_1a_neon_ok,,arm_v8_1a_neon_ok}