OSDN Git Service

Fix an X86-64 abi bug. We now compile:
authorChris Lattner <sabre@nondot.org>
Sun, 25 Feb 2007 23:10:46 +0000 (23:10 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 25 Feb 2007 23:10:46 +0000 (23:10 +0000)
commitc30654cc96869149fea7b5ac091c2cd3459591e4
tree48a0bc16b3a1a3d204dc4b8372169c0cc5e53956
parentdf6b57ad4845c2aa0925ec27def313192b1c6ea9
Fix an X86-64 abi bug.  We now compile:

void foo(short);
void bar(unsigned short A) {
  foo(A);
}

into:

_bar:
        subq $8, %rsp
        movswl %di, %edi
        call _foo
        addq $8, %rsp
        ret

instead of:

_bar:
        subq $8, %rsp
        call _foo
        addq $8, %rsp
        ret

Testcase here: test/CodeGen/X86/x86-64-shortint.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34615 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp