From: Dan Li <ashimida@linux.alibaba.com>
To: gcc-patches@gcc.gnu.org
Cc: Dan Li <ashimida@linux.alibaba.com>
Subject: [PATCH] [PR103017] aarch64:fix redundant check in aut insn generation
Date: Mon, 1 Nov 2021 01:21:08 -0700 [thread overview]
Message-ID: <20211101082108.36200-1-ashimida@linux.alibaba.com> (raw)
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):
* config/aarch64/aarch64.md:
Signed-off-by: Dan Li <ashimida@linux.alibaba.com>
---
gcc/config/aarch64/aarch64.c | 6 +-----
gcc/config/aarch64/aarch64.md | 3 +--
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 699c105a42a..8448e56443c 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 1a39470a1fe..65ee6159d73 100644
--- a/gcc/config/aarch64/aarch64.md
+++ b/gcc/config/aarch64/aarch64.md
@@ -879,8 +879,7 @@ (define_insn "*do_return"
{
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";
--
2.17.1
next reply other threads:[~2021-11-01 8:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 8:21 Dan Li [this message]
2021-11-01 11:05 ` Richard Sandiford
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211101082108.36200-1-ashimida@linux.alibaba.com \
--to=ashimida@linux.alibaba.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).