xref: /llvm-project/llvm/test/MC/X86/cfi_offset-eip.s (revision 8c85aae6c5b282eee1f58e67334e809016f04776)
1// RUN: llvm-mc %s -triple i386-unknown-unknown
2
3// Make sure %eip is allowed as a register in cfi directives in 32-bit mode
4
5 .text
6 .align 4
7 .globl foo
8
9foo:
10 .cfi_startproc
11
12 movl (%edx), %ecx
13 movl 4(%edx), %ebx
14 movl 8(%edx), %esi
15 movl 12(%edx), %edi
16 movl 16(%edx), %ebp
17 .cfi_def_cfa %edx, 0
18 .cfi_offset %eip, 24
19 .cfi_register %esp, %ecx
20 movl %ecx, %esp
21
22 jmp *24(%edx)
23
24 .cfi_endproc
25