binutils-gdb/libsframe
Indu Bhagat c1929fda66 [SFrame-V3] sframe: s390: gas: testsuite: enable flex FDE for s390x
This commit amalgamates a patch set proposed by Jens Remus to enable the
SFrame Version 3 Flexible FDE Type (SFRAME_FDE_TYPE_FLEX) generation for
the s390x ABI.

Previously, s390x relied on architecture-specific encoding (shifting register
numbers into offset fields) to represent register recovery rules.  This limited
the complexity of CFI that could be supported.  With Flex FDE enabled:
  - s390x can now represent .cfi_def_cfa using non-SP/FP registers.
  - The architecture-specific function s390_sframe_xlate_do_register () in GAS
    is replaced by the generic Flex FDE generation path.
  - The SFrame V3 specific macros for s390x register encoding are removed
    from libsframe/include, as the generic Flex FDE format handles explicit
    register columns natively.

The testsuite is updated to replace negative tests (which asserted
warnings or empty SFrame generation for these patterns) with positive
tests verifying valid Flex FDE generation.

Co-authored-by: Jens Remus <jremus@linux.ibm.com>

gas/
	* config/tc-s390.c (s390_support_flex_fde_p): Return true to
	enable Flex FDE generation.
	* gen-sframe.c (s390_sframe_xlate_do_register): Disable s390x
	specific implementation.
	(sframe_xlate_do_register): Invoke generic Flex FDE path now
	that flex FDE generation is supported.
gas/testsuite/
	* gas/cfi-sframe/cfi-sframe-s390x-err-1.d: Removed.
	* gas/cfi-sframe/cfi-sframe-s390x-err-1.s: Moved to...
	* gas/cfi-sframe/cfi-sframe-s390x-non-spfp-cfa-1.s: ...here.
	* gas/cfi-sframe/cfi-sframe-s390x-err-2.d: Removed.
	* gas/cfi-sframe/cfi-sframe-s390x-err-2.s: Moved to...
	* gas/cfi-sframe/cfi-sframe-s390x-non-spfp-cfa-2.s: ...here.
	* gas/cfi-sframe/cfi-sframe-s390x-fpra-register-1.d: Update to
	expect Flex FDE output.
	* gas/cfi-sframe/cfi-sframe-s390x-fpra-register-2.d: Likewise.
	* gas/cfi-sframe/cfi-sframe.exp: Run renamed tests.
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): Return false
	for SFrame V3.
	(sframe_s390x_offset_decode_regnum): Remove V3 support.
2026-01-15 17:02:28 -08:00
..
doc [SFrame-V3] sframe: doc: specification changes for SFrame version 3 2026-01-15 17:02:28 -08:00
testsuite [SFrame-V3] include: gas: libsframe: split FDE into idx and attr 2026-01-15 17:02:27 -08:00
aclocal.m4 Binutils: Add clang LTO support to AR and RANLIB 2025-09-25 12:30:13 +08:00
config.h.in
configure tidy m4 plugin config support 2025-11-03 10:59:50 +10:30
configure.ac Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
libsframe.ver [SFrame-V3] bfd: ld: sframe: avoid unnecessary decoding of SFrame FREs at link time 2026-01-15 17:02:26 -08:00
libtool-version [SFrame-V3] libsframe: bump so version to libsframe.so.3.0.0 2026-01-15 17:02:24 -08:00
Makefile.am Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
Makefile.in [SFrame-V3] libsframe: testsuite: add a new test for SFrame V2 2026-01-15 17:02:23 -08:00
README libsframe: add README and mention expectations 2026-01-05 11:53:13 -08:00
sframe-dump.c [SFrame-V3] sframe: s390: gas: testsuite: enable flex FDE for s390x 2026-01-15 17:02:28 -08:00
sframe-error.c Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe-impl.h Update year range in copyright notice of binutils files 2026-01-01 23:22:14 +10:30
sframe.c [SFrame-V3] include: gas: libsframe: split FDE into idx and attr 2026-01-15 17:02:27 -08:00

libsframe is a support library for the GNU Binutils collection (currently used
by GNU ld, objdump, etc.) to read and write SFrame section data.

Note: This library is currently intended for internal use by GNU Binutils only.
Strict guarantees for ABI compatibility are not provided, and external projects
should not rely on the stability of these interfaces.