xref: /llvm-project/lldb/test/Shell/Unwind/Inputs/eh-frame-dwarf-unwind.s (revision 87aa9c9e4d41ed881453e2fab85b3d25f648bb55)
1        .text
2        .globl  bar
3bar:
4        .cfi_startproc
5        leal    (%edi, %edi), %eax
6        ret
7        .cfi_endproc
8
9        .globl  foo
10foo:
11        .cfi_startproc
12        .cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c
13        call    bar
14        addl    $1, %eax
15        popq    %rdi
16        subq    $0x47, %rdi
17        jmp     *%rdi # Return
18        .cfi_endproc
19
20        .globl  asm_main
21asm_main:
22        .cfi_startproc
23        pushq   %rbp
24        .cfi_def_cfa_offset 16
25        .cfi_offset 6, -16
26        movq    %rsp, %rbp
27        .cfi_def_cfa_register 6
28        movl    $47, %edi
29
30        # Non-standard calling convention. The real return address must be
31        # decremented by 0x47.
32        leaq    0x47+1f(%rip), %rax
33        pushq   %rax
34        jmp     foo # call
351:
36        popq    %rbp
37        .cfi_def_cfa 7, 8
38        ret
39        .cfi_endproc
40