diff mbox series

[v2,2/7] aarch64: Do not force a stack frame for EH returns

Message ID ae13c81e51afd2f628af10485d286b3dc7ab8daa.1699025214.git.szabolcs.nagy@arm.com
State New
Headers show
Series aarch64 GCS preliminary patches | expand

Commit Message

Szabolcs Nagy Nov. 3, 2023, 3:36 p.m. UTC
EH returns no longer rely on clobbering the return address on the stack
so forcing a stack frame is not necessary.

This does not actually change the code gen for the unwinder since there
are calls before the EH return.

gcc/ChangeLog:

	* config/aarch64/aarch64.cc (aarch64_needs_frame_chain): Do not
	force frame chain for eh_return.
---
unchanged compared to v1
already approved at:
https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629346.html
---
 gcc/config/aarch64/aarch64.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Richard Sandiford Nov. 26, 2023, 12:12 p.m. UTC | #1
Szabolcs Nagy <szabolcs.nagy@arm.com> writes:
> EH returns no longer rely on clobbering the return address on the stack
> so forcing a stack frame is not necessary.
>
> This does not actually change the code gen for the unwinder since there
> are calls before the EH return.
>
> gcc/ChangeLog:
>
> 	* config/aarch64/aarch64.cc (aarch64_needs_frame_chain): Do not
> 	force frame chain for eh_return.

OK, thanks.

Richard

> ---
> unchanged compared to v1
> already approved at:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-September/629346.html
> ---
>  gcc/config/aarch64/aarch64.cc | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
> index 5cdb33dd3dc..88594bed8ce 100644
> --- a/gcc/config/aarch64/aarch64.cc
> +++ b/gcc/config/aarch64/aarch64.cc
> @@ -8492,8 +8492,7 @@ aarch64_output_probe_sve_stack_clash (rtx base, rtx adjustment,
>  static bool
>  aarch64_needs_frame_chain (void)
>  {
> -  /* Force a frame chain for EH returns so the return address is at FP+8.  */
> -  if (frame_pointer_needed || crtl->calls_eh_return)
> +  if (frame_pointer_needed)
>      return true;
>  
>    /* A leaf function cannot have calls or write LR.  */
diff mbox series

Patch

diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc
index 5cdb33dd3dc..88594bed8ce 100644
--- a/gcc/config/aarch64/aarch64.cc
+++ b/gcc/config/aarch64/aarch64.cc
@@ -8492,8 +8492,7 @@  aarch64_output_probe_sve_stack_clash (rtx base, rtx adjustment,
 static bool
 aarch64_needs_frame_chain (void)
 {
-  /* Force a frame chain for EH returns so the return address is at FP+8.  */
-  if (frame_pointer_needed || crtl->calls_eh_return)
+  if (frame_pointer_needed)
     return true;
 
   /* A leaf function cannot have calls or write LR.  */