[LLVMbugs] [Bug 20774] New: cfi information is not correct in epilogue

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Aug 27 11:10:11 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20774

            Bug ID: 20774
           Summary: cfi information is not correct in epilogue
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: jmuizelaar at mozilla.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following program:

int r()
{
    return 9;
}

clang -O2 -fno-omit-framepointer -S gives:

_r:                                     ## @r
        .cfi_startproc
## BB#0:                                ## %entry
        pushq   %rbp
Ltmp0:
        .cfi_def_cfa_offset 16
Ltmp1:
        .cfi_offset %rbp, -16
        movq    %rsp, %rbp
Ltmp2:
        .cfi_def_cfa_register %rbp
        movl    $9, %eax
        popq    %rbp
        retq
        .cfi_endproc


vs gcc's:

r:
.LFB0:
        .cfi_startproc
        pushq   %rbp
        .cfi_def_cfa_offset 16
        .cfi_offset 6, -16
        movl    $9, %eax
        movq    %rsp, %rbp
        .cfi_def_cfa_register 6
        popq    %rbp
        .cfi_def_cfa 7, 8
        ret
        .cfi_endproc
.LFE0:

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140827/8c8e30e5/attachment.html>


More information about the llvm-bugs mailing list