Be bug compatible with gcc by returning MMX values in RAX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65274 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-02-22 08:05:12 +00:00
parent c94ebef1b1
commit 6140a8b057
3 changed files with 18 additions and 8 deletions

View File

@@ -72,8 +72,9 @@ def RetCC_X86_64_C : CallingConv<[
CCIfType<[f32], CCAssignToReg<[XMM0, XMM1]>>,
CCIfType<[f64], CCAssignToReg<[XMM0, XMM1]>>,
// MMX vector types are always returned in XMM0.
CCIfType<[v8i8, v4i16, v2i32, v1i64, v2f32], CCAssignToReg<[XMM0, XMM1]>>,
// MMX vector types are always returned in RAX. This seems to disagree with
// ABI documentation but is bug compatible with gcc.
CCIfType<[v8i8, v4i16, v2i32, v1i64, v2f32], CCAssignToReg<[RAX]>>,
CCDelegateTo<RetCC_X86Common>
]>;