brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 273921c Raw
51 lines · plain
1        .text2        .globl  bar3bar:4        .cfi_startproc5        leal    (%edi, %edi), %eax6        ret7        .cfi_endproc8 9        .globl  foo10        # This function uses a non-standard calling convention (return address11        # needs to be adjusted) to force lldb to use eh_frame/debug_frame12        # instead of reading the code directly.13foo:14        .cfi_startproc15        .cfi_escape 0x16, 0x10, 0x06, 0x38, 0x1c, 0x06, 0x08, 0x47, 0x1c16        # Clobber r12 and record that it's reconstructable from CFA17        .cfi_val_offset %r12, 3218        movq    $0x456, %r1219        call    bar20        addl    $1, %eax21        # Reconstruct %r1222        movq    %rsp, %r1223        addq    %r12, 824        popq    %rdi25        subq    $0x47, %rdi26        jmp     *%rdi # Return27        .cfi_endproc28 29        .globl  asm_main30asm_main:31        .cfi_startproc32        pushq   %rbp33        .cfi_def_cfa_offset 1634        .cfi_offset %rbp, -1635        movq    %rsp, %rbp36        movq    %rsp, %r1237        addq    $32, %r1238        .cfi_def_cfa_register %rbp39        movl    $47, %edi40 41        # Non-standard calling convention. The real return address must be42        # decremented by 0x47.43        leaq    0x47+1f(%rip), %rax44        pushq   %rax45        jmp     foo # call461:47        popq    %rbp48        .cfi_def_cfa %rsp, 849        ret50        .cfi_endproc51