xref: /llvm-project/llvm/test/MC/ELF/cfi-startproc-pushsection.s (revision 6d9b0759c24e93c2ef1f10ca59c7317c7b440468)
1// RUN: llvm-mc -filetype=obj -triple x86_64-linux %s -o - | llvm-dwarfdump --eh-frame - | FileCheck %s
2
3.section .text.a, "ax", %progbits
4.cfi_startproc
5.cfi_def_cfa %rsp, 0
6
7.pushsection .text.b, "ax", %progbits
8.cfi_startproc simple
9.cfi_def_cfa %rsp, 8
10nop
11ret
12
13.pushsection .text.c, "ax", %progbits
14.cfi_startproc simple
15.cfi_def_cfa %rsp, 16
16nop
17nop
18ret
19.cfi_endproc
20.popsection
21
22.cfi_endproc
23.popsection
24
25.pushsection .text.d, "ax", %progbits
26.cfi_startproc simple
27.cfi_def_cfa %rsp, 24
28nop
29nop
30nop
31ret
32.cfi_endproc
33.popsection
34
35ret
36.cfi_endproc
37
38// CHECK: pc=00000000...00000001
39// CHECK: RSP +0
40// CHECK: pc=00000000...00000002
41// CHECK: RSP +8
42// CHECK: pc=00000000...00000003
43// CHECK: RSP +16
44// CHECK: pc=00000000...00000004
45// CHECK: RSP +24
46