[gcc(refs/users/wschmidt/heads/dd2)] rs6000: Don't do a hashchk for a sibcall
William Schmidt
wschmidt@gcc.gnu.org
Wed Mar 17 22:17:20 GMT 2021
https://gcc.gnu.org/g:dfb8d9893e2374a27af59dbb4fa1abe174e53d5e
commit dfb8d9893e2374a27af59dbb4fa1abe174e53d5e
Author: Bill Schmidt <wschmidt@linux.ibm.com>
Date: Wed Mar 17 17:16:57 2021 -0500
rs6000: Don't do a hashchk for a sibcall
2021-03-17 Bill Schmidt <wschmidt@linux.ibm.com>
gcc/
* config/rs6000/rs6000-logue.c (rs6000_emit_epilogue): Skip the
ROP check for a sibcall.
Diff:
---
gcc/config/rs6000/rs6000-logue.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/gcc/config/rs6000/rs6000-logue.c b/gcc/config/rs6000/rs6000-logue.c
index de99f708803..277b2e656f4 100644
--- a/gcc/config/rs6000/rs6000-logue.c
+++ b/gcc/config/rs6000/rs6000-logue.c
@@ -5013,8 +5013,10 @@ rs6000_emit_epilogue (enum epilogue_type epilogue_type)
emit_insn (gen_add3_insn (sp_reg_rtx, sp_reg_rtx, sa));
}
- /* The ROP hash check must occur after the stack pointer is restored. */
- if (rs6000_rop_protect)
+ /* The ROP hash check must occur after the stack pointer is restored,
+ and is not performed for a sibcall. */
+ if (rs6000_rop_protect && epilogue_type != EPILOGUE_TYPE_SIBCALL)
+
{
gcc_assert (DEFAULT_ABI == ABI_ELFv2);
rtx stack_ptr = gen_rtx_REG (Pmode, STACK_POINTER_REGNUM);
More information about the Gcc-cvs
mailing list