X86 ABI fix for return values > 24 bytes.
authorAndrew Trick <atrick@apple.com>
Thu, 5 Feb 2015 18:09:05 +0000 (18:09 +0000)
committerAndrew Trick <atrick@apple.com>
Thu, 5 Feb 2015 18:09:05 +0000 (18:09 +0000)
commitc4ae8cbc5d7fae1d3007b43ecd5df7a2d953a0a0
treee5a8f272acb07e365045f74d0189d71a34fd25a0
parent916b91acf10b57fc7f9facb5df56d5d59c95159e
X86 ABI fix for return values > 24 bytes.

The return value's address must be returned in %rax.
i.e. the callee needs to copy the sret argument (%rdi)
into the return value (%rax).

This probably won't manifest as a bug when the caller is LLVM-compiled
code. But it is an ABI guarantee and tools expect it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228321 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/sret-implicit.ll [new file with mode: 0644]
test/CodeGen/X86/vselect.ll