[llvm-commits] [llvm] r46215 - /llvm/branches/release_22/lib/Target/X86/X86CallingConv.td
Tanya Lattner
tonic at nondot.org
Mon Jan 21 12:47:25 PST 2008
Author: tbrethou
Date: Mon Jan 21 14:47:24 2008
New Revision: 46215
URL: http://llvm.org/viewvc/llvm-project?rev=46215&view=rev
Log:
Merge from mainline.
Need to handle any 'nest' parameter before integer
parameters, since otherwise it won't be passed in
the right register. With this change trampolines
work on x86-64 (thanks to Luke Guest for providing
access to an x86-64 box).
Modified:
llvm/branches/release_22/lib/Target/X86/X86CallingConv.td
Modified: llvm/branches/release_22/lib/Target/X86/X86CallingConv.td
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_22/lib/Target/X86/X86CallingConv.td?rev=46215&r1=46214&r2=46215&view=diff
==============================================================================
--- llvm/branches/release_22/lib/Target/X86/X86CallingConv.td (original)
+++ llvm/branches/release_22/lib/Target/X86/X86CallingConv.td Mon Jan 21 14:47:24 2008
@@ -101,7 +101,10 @@
// Promote i8/i16 arguments to i32.
CCIfType<[i8, i16], CCPromoteToType<i32>>,
-
+
+ // The 'nest' parameter, if any, is passed in R10.
+ CCIfNest<CCAssignToReg<[R10]>>,
+
// 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 ]>>,
@@ -114,9 +117,6 @@
CCIfType<[v8i8, v4i16, v2i32, v1i64],
CCAssignToReg<[RDI, RSI, RDX, RCX, R8 , R9 ]>>,
- // The 'nest' parameter, if any, is passed in R10.
- CCIfNest<CCAssignToReg<[R10]>>,
-
// 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>>,
@@ -140,7 +140,10 @@
// Promote i8/i16 arguments to i32.
CCIfType<[i8, i16], CCPromoteToType<i32>>,
-
+
+ // The 'nest' parameter, if any, is passed in R10.
+ CCIfNest<CCAssignToReg<[R10]>>,
+
// 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]>>,
@@ -153,9 +156,6 @@
CCIfType<[v8i8, v4i16, v2i32, v1i64],
CCAssignToReg<[RDI, RSI, RDX, RCX, R8]>>,
- // The 'nest' parameter, if any, is passed in R10.
- CCIfNest<CCAssignToReg<[R10]>>,
-
// 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>>,
More information about the llvm-commits
mailing list