]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[SFrame-V3] gas: sframe: testsuite: skip SFrame FDE if .cfi_register SP, reg
authorIndu Bhagat <indu.bhagat@oracle.com>
Fri, 16 Jan 2026 00:43:12 +0000 (16:43 -0800)
committerIndu Bhagat <indu.bhagat@oracle.com>
Fri, 16 Jan 2026 01:02:26 +0000 (17:02 -0800)
commit72cd17f0be64f10386631bca93c8f82f2cb46d89
tree4a043f9ffbd404dad4f79a082c1674a8f82d00a6
parent7e11620c672a7992b15fb7306bc800f02d2f38e8
[SFrame-V3] gas: sframe: testsuite: skip SFrame FDE if .cfi_register SP, reg

SFrame does not track the SP.  For recovery of the SP, SFrame relies on
the architecture/ABI's CFA definition:

  CFA = SP [+ offset   // on s390x]

Which results in the following implicit CFA value offset rule for SP:

  SP = CFA [- offset   // on s390x]

Where offset is zero for most architectures/ABIs, except s390x.

Therefore .cfi_register SP, reg directives must be rejected, as such
semantics cannot be represented in SFrame yet.

gas/
* gas/gen-sframe.c (s390_sframe_xlate_do_register): Check for
REG_SP and reject while generating a warning.
(sframe_xlate_do_register): Likewise.
gas/testsuite/
* gas/cfi-sframe/cfi-sframe-s390x-err-4.d: New test.
* gas/cfi-sframe/cfi-sframe-s390x-err-4.s: Likewise.
* gas/cfi-sframe/cfi-sframe-x86_64-empty-5.d: Likewise.
* gas/cfi-sframe/cfi-sframe-x86_64-empty-5.s: Likewise.
* gas/cfi-sframe/cfi-sframe.exp: Add new tests.
gas/gen-sframe.c
gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-err-4.d [new file with mode: 0644]
gas/testsuite/gas/cfi-sframe/cfi-sframe-s390x-err-4.s [new file with mode: 0644]
gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-empty-5.d [new file with mode: 0644]
gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-empty-5.s [new file with mode: 0644]
gas/testsuite/gas/cfi-sframe/cfi-sframe.exp