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

            Bug ID: 20028
           Summary: clang-cl adds an extra 'ret' to __declspec(naked)
                    functions
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

__declspec(naked) void foo(int k, int r)
{
    _asm {
        ret;
    }
}

cl gives:

_foo:
       retl

clang-cl gives:
_foo:
       movl    12(%ebp), %eax
       movl    8(%ebp), %ecx
       movl    %eax, -4(%ebp)
       movl    %ecx, -8(%ebp)
       retl
       retl

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to