[RFC 20/28] [SFrame-V3] gas: x86: testsuite: add new testcases for SFRAME_FDE_TYPE_FLEX_TOPMOST_FRAME
Indu Bhagat
indu.bhagat@oracle.com
Tue Dec 16 06:17:30 GMT 2025
On 12/15/25 8:17 AM, Jens Remus wrote:
> Hello Indu!
>
> On 12/9/2025 10:07 AM, Indu Bhagat wrote:
>
>> diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.d b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.d
>
>> @@ -0,0 +1,26 @@
>> +#as: --gsframe
>> +#objdump: --sframe=.sframe
>> +#name: DRAP pattern with r10-based CFA
>> +#...
>> +Contents of the SFrame section .sframe:
>> +
>> + Header :
>> +
>> + Version: SFRAME_VERSION_3
>> + Flags: SFRAME_F_FDE_FUNC_START_PCREL
>> +#? CFA fixed FP offset: \-?\d+
>> +#? CFA fixed RA offset: \-?\d+
>> + Num FDEs: 1
>> + Num FREs: 6
>> +
>> + Function Index :
>> +
>> + func idx \[0\]: pc = 0x0, size = 95 bytes
>> + STARTPC +CFA +FP +RA +
>> + 0+0000 +sp\+8 +u +f +
>> + 0+0009 +r10\+0 +u +f +
>> + 0+0018 +r10\+0 +\(fp\+0\) +f +
>> + 0+001a +\(fp\-8\) +\(fp\+0\) +f +
>> + 0+0052 +r10\+0 +\(fp\+0\) +f +
>> + 0+005e +sp\+8 +\(fp\+0\) +f +
>> +#pass
>
> This test fails as follows when run on s390x:
>
> regexp_diff match failure
> regexp "^ 0+001a +\(fp\-8\) +\(fp\+0\) +f +$"
> line " 000000000000001a (fp+0) (fp+0) f "
> FAIL: DRAP pattern with r10-based CFA
>
> I am reviewing/testing your personal branch users/ibhagat/sframe-v3-c1
> if that matters.
>
Perhaps I am misunderstanding something. This test is run on x86-64 only...
>> diff --git a/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.s b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.s
>> new file mode 100644
>> index 00000000000..56eb05306dd
>> --- /dev/null
>> +++ b/gas/testsuite/gas/cfi-sframe/cfi-sframe-x86_64-4.s
>> @@ -0,0 +1,43 @@
>> + .p2align 4
>> + .globl _ITM_RM256
>> + .type _ITM_RM256, @function
>> +_ITM_RM256:
>> + .cfi_startproc
>> + endbr64
>> + leaq 8(%rsp), %r10
>> + .cfi_def_cfa 10, 0
>> + andq $-32, %rsp
>> + movq %rdi, %rdx
>> + pushq -8(%r10)
>> + pushq %rbp
>> + movq %rsp, %rbp
>> + # DW_CFA_expression, (uleb)reg, length, DW_OP_breg6, (sleb)offset
>> + .cfi_escape 0x10,0x6,0x2,0x76,0
>> + pushq %r10
>> + # DW_CFA_def_cfa_expression, length, DW_OP_breg6, (sleb)offset, DW_OP_deref
>> + .cfi_escape 0xf,0x3,0x76,0x78,0x6
>> + subq $48, %rsp
>> +
>> + movq %fs:(80+1*8),%rdi
>> + rorq $17,%rdi
>> + xorq %fs:48,%rdi
>> +
>> + movq (%rdi), %rax
>> + leaq -48(%rbp), %rsi
>> + pushq $1
>> + xorl %r9d, %r9d
>> + xorl %r8d, %r8d
>> + movl $32, %ecx
>> + call *608(%rax)
>> +
>> + movq -8(%rbp), %r10
>> + .cfi_def_cfa 10, 0
>> + vmovaps -48(%rbp), %ymm0
>> + popq %rax
>> + popq %rdx
>> + leave
>> + leaq -8(%r10), %rsp
>> + .cfi_def_cfa 7, 8
>> + ret
>> + .cfi_endproc
>> + .size _ITM_RM256, .-_ITM_RM256
> Regards,
> Jens
More information about the Binutils
mailing list