aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDan Li <ashimida@linux.alibaba.com>2021-11-01 11:04:12 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-11-01 11:04:12 +0000
commit14d31404053c1818044882f8682a20de1526b266 (patch)
tree75f266e546321d2d510b62f1aa8d6433613423eb /gcc
parent4851c80ce8de18896dc5c4b1b023afa8456736ba (diff)
downloadgcc-14d31404053c1818044882f8682a20de1526b266.zip
gcc-14d31404053c1818044882f8682a20de1526b266.tar.gz
gcc-14d31404053c1818044882f8682a20de1526b266.tar.bz2
aarch64: Fix redundant check in aut insn generation
During the generation of the epilogue of aarch64(aarch64_expand_epilogue), the value of crtl->calls_eh_return does not need to be checked again. This value has been checked during aarch64_return_address_signing_enabled. gcc/ChangeLog: * config/aarch64/aarch64.c (aarch64_expand_epilogue): Remove redundant check for calls_eh_return. * config/aarch64/aarch64.md (*do_return): Likewise. Signed-off-by: Dan Li <ashimida@linux.alibaba.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/aarch64/aarch64.c6
-rw-r--r--gcc/config/aarch64/aarch64.md3
2 files changed, 2 insertions, 7 deletions
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 699c105..8448e56 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -9076,13 +9076,9 @@ aarch64_expand_epilogue (bool for_sibcall)
2) The RETAA instruction is not available before ARMv8.3-A, so if we are
generating code for !TARGET_ARMV8_3 we can't use it and must
explicitly authenticate.
-
- 3) On an eh_return path we make extra stack adjustments to update the
- canonical frame address to be the exception handler's CFA. We want
- to authenticate using the CFA of the function which calls eh_return.
*/
if (aarch64_return_address_signing_enabled ()
- && (for_sibcall || !TARGET_ARMV8_3 || crtl->calls_eh_return))
+ && (for_sibcall || !TARGET_ARMV8_3))
{
switch (aarch64_ra_sign_key)
{
diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md
index 1a39470..65ee615 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -879,8 +879,7 @@
{
const char *ret = NULL;
if (aarch64_return_address_signing_enabled ()
- && (TARGET_PAUTH)
- && !crtl->calls_eh_return)
+ && (TARGET_PAUTH))
{
if (aarch64_ra_sign_key == AARCH64_KEY_B)
ret = "retab";