[01/13] Revert "gas: Don't skip SFrame FDE if .cfi_register specifies RA w/o tracking"

Message ID 20251202073414.200246-2-indu.bhagat@oracle.com
State New
Headers
Series sframe: some refactoring and misc improvements |

Commit Message

Indu Bhagat Dec. 2, 2025, 7:34 a.m. UTC
  This reverts commit df174a6b760ac5c66ee62ecb872c760ae21fd4cd.

Even for ABI/arch without RA tracking, there may be instances where user
may specify '.cfi_register RA, reg'.  This needs to be caught, skipping
this from SFrame generation may not be correct.  This may be done in
certain hand-written asm sequences where the user needs to manipulate
the return to a certain function.

A later commit will add a testcase for documentation purposes.
---
 gas/gen-sframe.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/gas/gen-sframe.c b/gas/gen-sframe.c
index 0d6edd362cb..eead58b00f6 100644
--- a/gas/gen-sframe.c
+++ b/gas/gen-sframe.c
@@ -1281,7 +1281,7 @@  sframe_xlate_do_register (struct sframe_xlate_ctx *xlate_ctx,
      instruction can be safely skipped without sacrificing the asynchronicity of
      stack trace information.  */
   if (cfi_insn->u.rr.reg1 == SFRAME_CFA_FP_REG
-      || (sframe_ra_tracking_p () && cfi_insn->u.rr.reg1 == SFRAME_CFA_RA_REG)
+      || cfi_insn->u.rr.reg1 == SFRAME_CFA_RA_REG
       /* Ignore SP reg, as it can be recovered from the CFA tracking info.  */
       )
     {