From 3d5591038a7a2b254d1c8e7b4415403a252e6890 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 28 Feb 2007 04:51:41 +0000 Subject: [PATCH] make subtarget references work. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34721 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86CallingConv.td | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/Target/X86/X86CallingConv.td b/lib/Target/X86/X86CallingConv.td index 98b978882e0..079313b8cc3 100644 --- a/lib/Target/X86/X86CallingConv.td +++ b/lib/Target/X86/X86CallingConv.td @@ -12,6 +12,10 @@ // //===----------------------------------------------------------------------===// +/// CCMatchIfSubtarget - Match if the current subtarget has a feature F. +class CCMatchIfSubtarget + : CCMatchIf().",F),A>; + //===----------------------------------------------------------------------===// // Return Value Calling Conventions //===----------------------------------------------------------------------===// @@ -42,8 +46,8 @@ def RetCC_X86_32_C : CallingConv<[ 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 ]>; @@ -73,7 +77,7 @@ def RetCC_X86_64 : CallingConv<[ // This is the return-value convention used for the entire X86 backend. def RetCC_X86 : CallingConv<[ - CCMatchIf<"Subtarget->is64Bit()", CCDelegateTo>, + CCMatchIfSubtarget<"is64Bit()", CCDelegateTo>, CCDelegateTo ]>;