From bdfd5ef823602c2447d20c72d28eef5eb9735402 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Tue, 15 Jan 2008 03:15:41 +0000 Subject: [PATCH] Both x86-32 and x86-64 handle byval parameter attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45996 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86CallingConv.td | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86CallingConv.td b/lib/Target/X86/X86CallingConv.td index cd772cc50bf..aaa304e45f1 100644 --- a/lib/Target/X86/X86CallingConv.td +++ b/lib/Target/X86/X86CallingConv.td @@ -96,11 +96,12 @@ def RetCC_X86 : CallingConv<[ //===----------------------------------------------------------------------===// def CC_X86_64_C : CallingConv<[ + // Handles byval parameters. + CCIfStruct>, + // Promote i8/i16 arguments to i32. CCIfType<[i8, i16], CCPromoteToType>, - CCIfStruct>, - // The first 6 integer arguments are passed in integer registers. CCIfType<[i32], CCAssignToReg<[EDI, ESI, EDX, ECX, R8D, R9D]>>, CCIfType<[i64], CCAssignToReg<[RDI, RSI, RDX, RCX, R8 , R9 ]>>, @@ -134,11 +135,12 @@ def CC_X86_64_C : CallingConv<[ // Tail call convention (fast): One register is reserved for target address, // namely R9 def CC_X86_64_TailCall : CallingConv<[ + // Handles byval parameters. + CCIfStruct>, + // Promote i8/i16 arguments to i32. CCIfType<[i8, i16], CCPromoteToType>, - CCIfStruct>, - // The first 6 integer arguments are passed in integer registers. CCIfType<[i32], CCAssignToReg<[EDI, ESI, EDX, ECX, R8D]>>, CCIfType<[i64], CCAssignToReg<[RDI, RSI, RDX, RCX, R8]>>, @@ -174,6 +176,9 @@ def CC_X86_64_TailCall : CallingConv<[ /// values are spilled on the stack, and the first 4 vector values go in XMM /// regs. def CC_X86_32_Common : CallingConv<[ + // Handles byval parameters. + CCIfStruct>, + // Integer/Float values get stored in stack slots that are 4 bytes in // size and 4-byte aligned. CCIfType<[i32, f32], CCAssignToStack<4, 4>>, -- 2.34.1