[llvm-commits] CVS: llvm/lib/Target/X86/X86CallingConv.td
Chris Lattner
sabre at nondot.org
Tue Feb 27 20:51:57 PST 2007
Changes in directory llvm/lib/Target/X86:
X86CallingConv.td updated: 1.5 -> 1.6
---
Log message:
make subtarget references work.
---
Diffs of the changes: (+7 -3)
X86CallingConv.td | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
Index: llvm/lib/Target/X86/X86CallingConv.td
diff -u llvm/lib/Target/X86/X86CallingConv.td:1.5 llvm/lib/Target/X86/X86CallingConv.td:1.6
--- llvm/lib/Target/X86/X86CallingConv.td:1.5 Tue Feb 27 00:59:52 2007
+++ llvm/lib/Target/X86/X86CallingConv.td Tue Feb 27 22:51:41 2007
@@ -12,6 +12,10 @@
//
//===----------------------------------------------------------------------===//
+/// CCMatchIfSubtarget - Match if the current subtarget has a feature F.
+class CCMatchIfSubtarget<string F, CCAction A>
+ : CCMatchIf<!strconcat("State.getTarget().getSubtarget<X86Subtarget>().",F),A>;
+
//===----------------------------------------------------------------------===//
// Return Value Calling Conventions
//===----------------------------------------------------------------------===//
@@ -42,8 +46,8 @@
def RetCC_X86_32_Fast : CallingConv<[
// The X86-32 fastcc returns FP values in XMM0 if the target has SSE2,
// otherwise it is the the C calling conventions.
- CCMatchType<[f32], CCMatchIf<"Subtarget->hasSSE2()", CCAssignToReg<[XMM0]>>>,
- CCMatchType<[f64], CCMatchIf<"Subtarget->hasSSE2()", CCAssignToReg<[XMM0]>>>,
+ CCMatchType<[f32], CCMatchIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0]>>>,
+ CCMatchType<[f64], CCMatchIfSubtarget<"hasSSE2()", CCAssignToReg<[XMM0]>>>,
CCDelegateTo<RetCC_X86Common>
]>;
@@ -73,7 +77,7 @@
// This is the return-value convention used for the entire X86 backend.
def RetCC_X86 : CallingConv<[
- CCMatchIf<"Subtarget->is64Bit()", CCDelegateTo<RetCC_X86_64>>,
+ CCMatchIfSubtarget<"is64Bit()", CCDelegateTo<RetCC_X86_64>>,
CCDelegateTo<RetCC_X86_32>
]>;
More information about the llvm-commits
mailing list