aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-14 08:29:13 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-14 08:29:13 +0000
commit87b665d3dee92ef5f30d9eb1afdb64448bc3e2ef (patch)
tree521936bd9b55ee796e8d3e92ca991adbe3796471 /lib
parent38afd9e3ac3f6b47a45528e708e800730dbbfd2d (diff)
Eliminate the recently introduced CCAssignToStackABISizeAlign
in favour of teaching CCAssignToStack that size 0 and/or align 0 means to use the ABI values. This seems a neater solution. It is safe since no legal value type has size 0. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/TargetCallingConv.td11
-rw-r--r--lib/Target/X86/X86CallingConv.td4
2 files changed, 5 insertions, 10 deletions
diff --git a/lib/Target/TargetCallingConv.td b/lib/Target/TargetCallingConv.td
index 05029a01a6..62eb1c743a 100644
--- a/lib/Target/TargetCallingConv.td
+++ b/lib/Target/TargetCallingConv.td
@@ -60,19 +60,14 @@ class CCAssignToReg<list<Register> regList> : CCAction {
}
/// CCAssignToStack - This action always matches: it assigns the value to a
-/// stack slot of the specified size and alignment on the stack.
+/// stack slot of the specified size and alignment on the stack. If size is
+/// zero then the ABI size is used; if align is zero then the ABI alignment
+/// is used - these may depend on the target or subtarget.
class CCAssignToStack<int size, int align> : CCAction {
int Size = size;
int Align = align;
}
-/// CCAssignToStackABISizeAlign - This action always matches: it assigns
-/// the value to a stack slot of the ABISize and ABIAlignment for the type,
-/// which may depend on the target or subtarget.
-/// "ignored" is here because an empty arg list does not work.
-class CCAssignToStackABISizeAlign<int ignored> : CCAction {
-}
-
/// CCStructAssign - This action always matches: it will use the C ABI and
/// the register availability to decided whether to assign to a set of
/// registers or to a stack slot.
diff --git a/lib/Target/X86/X86CallingConv.td b/lib/Target/X86/X86CallingConv.td
index 97d4636b81..bb054e8f05 100644
--- a/lib/Target/X86/X86CallingConv.td
+++ b/lib/Target/X86/X86CallingConv.td
@@ -120,7 +120,7 @@ def CC_X86_64_C : CallingConv<[
// Long doubles get stack slots whose size and alignment depends on the
// subtarget.
- CCIfType<[f80], CCAssignToStackABISizeAlign<0>>,
+ CCIfType<[f80], CCAssignToStack<0, 0>>,
// Vectors get 16-byte stack slots that are 16-byte aligned.
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64], CCAssignToStack<16, 16>>,
@@ -181,7 +181,7 @@ def CC_X86_32_Common : CallingConv<[
// Long doubles get slots whose size and alignment depends on the
// subtarget.
- CCIfType<[f80], CCAssignToStackABISizeAlign<0>>,
+ CCIfType<[f80], CCAssignToStack<0, 0>>,
// The first 4 vector arguments are passed in XMM registers.
CCIfType<[v16i8, v8i16, v4i32, v2i64, v4f32, v2f64],