xref: /llvm-project/llvm/test/MC/ELF/cfi-return-column.s (revision fd785f98aaea1d99f7018051f0d80b554e7540e4)
1// REQUIRES: x86-registered-target
2// RUN: llvm-mc -triple i686 %s | FileCheck %s --check-prefix=ASM
3// RUN: llvm-mc -triple i686-unknown-linux-gnu -filetype obj -o - %s | llvm-objdump --dwarf=frames - | FileCheck %s --check-prefix=CHECK-EH_FRAME
4
5	.text
6
7	.section .text.f,"ax",@progbits
8	.global f
9	.type f,@function
10f:
11	.cfi_startproc
12	.cfi_return_column 0
13	.cfi_endproc
14
15	.section .text.g,"ax",@progbits
16	.global g
17	.type g,@function
18g:
19	.cfi_startproc
20	.cfi_return_column 65
21	.cfi_endproc
22
23	.section .text.h,"ax",@progbits
24	.global h
25	.type g,@function
26h:
27	.cfi_startproc
28	.cfi_return_column 65
29	.cfi_endproc
30
31// ASM-LABEL: f:
32// ASM:       .cfi_startproc
33// ASM-NEXT:  .cfi_return_column %eax
34// ASM-NEXT:  .cfi_endproc
35
36// CHECK-EH_FRAME: 00000000 00000014 00000000 CIE
37// CHECK-EH_FRAME:   Return address column: 0
38
39// CHECK-EH_FRAME: 0000002c 00000014 00000000 CIE
40// CHECK-EH_FRAME:   Return address column: 65
41
42// CHECK-EH_FRAME-NOT: ........ 00000014 00000000 CIE
43
44