From afddb2c6f87475ce1a565433cd9ceebf7c3af375 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Sat, 31 Mar 2007 01:03:53 +0000 Subject: [PATCH] Match GCC's MMX calling convention. llvm-svn: 35523 --- llvm/lib/Target/X86/X86CallingConv.td | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/Target/X86/X86CallingConv.td b/llvm/lib/Target/X86/X86CallingConv.td index d9a63c4ecd3c..ea01d1ead1ee 100644 --- a/llvm/lib/Target/X86/X86CallingConv.td +++ b/llvm/lib/Target/X86/X86CallingConv.td @@ -101,6 +101,10 @@ def CC_X86_64_C : CallingConv<[ CCIfType<[f32, f64, v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToReg<[XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7]>>, + // The first 8 MMX vector arguments are passed in MMX registers. + CCIfType<[v8i8, v4i16, v2i32, v1i64], + CCAssignToReg<[RDI, RSI, RDX, RCX, R8 , R9 ]>>, + // Integer/FP values get stored in stack slots that are 8 bytes in size and // 8-byte aligned if there are no more registers to hold them. CCIfType<[i32, i64, f32, f64], CCAssignToStack<8, 8>>,