]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Do not force a stack frame for EH returns
authorSzabolcs Nagy <szabolcs.nagy@arm.com>
Tue, 9 May 2023 10:07:05 +0000 (11:07 +0100)
committerSzabolcs Nagy <szabolcs.nagy@arm.com>
Mon, 27 Nov 2023 15:52:48 +0000 (15:52 +0000)
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.

gcc/config/aarch64/aarch64.cc

index 7ccadf91c2604dea8748508284d60ffac0a25095..b2093430937f459b00df6d289e831cc5824eaee9 100644 (file)
@@ -6137,8 +6137,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.  */