mirror of
https://github.com/bminor/binutils-gdb.git
synced 2026-02-04 21:01:38 +00:00
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:
@@ -529,19 +529,6 @@ typedef struct sframe_frame_row_entry_addr4
|
|||||||
#define SFRAME_V2_S390X_OFFSET_DECODE_REGNUM(offset) \
|
#define SFRAME_V2_S390X_OFFSET_DECODE_REGNUM(offset) \
|
||||||
((offset) >> 1)
|
((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
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ sframe_s390x_offset_regnum_p (int32_t offset, uint8_t ver)
|
|||||||
if (ver == SFRAME_VERSION_2)
|
if (ver == SFRAME_VERSION_2)
|
||||||
return SFRAME_V2_S390X_OFFSET_IS_REGNUM (offset);
|
return SFRAME_V2_S390X_OFFSET_IS_REGNUM (offset);
|
||||||
else if (ver == SFRAME_VERSION_3)
|
else if (ver == SFRAME_VERSION_3)
|
||||||
return SFRAME_V3_S390X_OFFSET_IS_REGNUM (offset);
|
return false;
|
||||||
else
|
else
|
||||||
/* No other version is supported yet. */
|
/* No other version is supported yet. */
|
||||||
sframe_assert (false);
|
sframe_assert (false);
|
||||||
@@ -133,8 +133,6 @@ sframe_s390x_offset_decode_regnum (int32_t offset, uint8_t ver)
|
|||||||
{
|
{
|
||||||
if (ver == SFRAME_VERSION_2)
|
if (ver == SFRAME_VERSION_2)
|
||||||
return SFRAME_V2_S390X_OFFSET_DECODE_REGNUM (offset);
|
return SFRAME_V2_S390X_OFFSET_DECODE_REGNUM (offset);
|
||||||
else if (ver == SFRAME_VERSION_3)
|
|
||||||
return SFRAME_V3_S390X_OFFSET_DECODE_REGNUM (offset);
|
|
||||||
else
|
else
|
||||||
/* No other version is supported yet. */
|
/* No other version is supported yet. */
|
||||||
sframe_assert (false);
|
sframe_assert (false);
|
||||||
|
|||||||
Reference in New Issue
Block a user