cleanup sframe.h and sframe-dump.c based on Jens' patch

commit 69c3a613a4
Author: Jens Remus <jremus@linux.ibm.com>
Date:   Fri Dec 12 16:05:01 2025 +0100

    s390: gas: sframe: Represent .cfi_register FP/RA using FLEX_TOPMOST_FRAME

    Signed-off-by: Jens Remus <jremus@linux.ibm.com>

include/

	* sframe.h (SFRAME_V3_S390X_OFFSET_IS_REGNUM): Remove.
	(SFRAME_V3_S390X_OFFSET_ENCODE_REGNUM): Remove.
	(SFRAME_V3_S390X_OFFSET_DECODE_REGNUM): Remove.

libsframe/

	* sframe-dump.c (sframe_s390x_offset_regnum_p): No more
	necessary for V3, now that it uses FLEX FDE instead.
	(sframe_s390x_offset_decode_regnum): Likewise.
This commit is contained in:
Indu Bhagat
2025-12-30 18:03:38 -08:00
parent f69a252276
commit 898c722096
2 changed files with 1 additions and 16 deletions

View File

@@ -529,19 +529,6 @@ typedef struct sframe_frame_row_entry_addr4
#define SFRAME_V2_S390X_OFFSET_DECODE_REGNUM(offset) \
((offset) >> 1)
/* In SFrame V3, change the encoding of register numbers in the SFrame offsets
on s390x by keeping the lower 3 bits aside.
- LSB=0: Stack offset. The s390x ELF ABI mandates that stack register
slots must be 8-byte aligned.
- LSB=1: DWARF register number shifted to the left by three.
Bits 1 and 2 are currently unused. */
#define SFRAME_V3_S390X_OFFSET_IS_REGNUM(offset) \
((offset) & 1)
#define SFRAME_V3_S390X_OFFSET_ENCODE_REGNUM(regnum) \
(((regnum) << 3) | 1)
#define SFRAME_V3_S390X_OFFSET_DECODE_REGNUM(offset) \
((offset) >> 3)
#ifdef __cplusplus
}
#endif

View File

@@ -122,7 +122,7 @@ sframe_s390x_offset_regnum_p (int32_t offset, uint8_t ver)
if (ver == SFRAME_VERSION_2)
return SFRAME_V2_S390X_OFFSET_IS_REGNUM (offset);
else if (ver == SFRAME_VERSION_3)
return SFRAME_V3_S390X_OFFSET_IS_REGNUM (offset);
return false;
else
/* No other version is supported yet. */
sframe_assert (false);
@@ -133,8 +133,6 @@ sframe_s390x_offset_decode_regnum (int32_t offset, uint8_t ver)
{
if (ver == SFRAME_VERSION_2)
return SFRAME_V2_S390X_OFFSET_DECODE_REGNUM (offset);
else if (ver == SFRAME_VERSION_3)
return SFRAME_V3_S390X_OFFSET_DECODE_REGNUM (offset);
else
/* No other version is supported yet. */
sframe_assert (false);