From: Chris Lattner Date: Tue, 5 Oct 2010 22:01:02 +0000 (+0000) Subject: add a multiclass for cmov's, but don't start using it yet. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b484213d1bde97b6a66969bef64d00530a05c12c;p=oota-llvm.git add a multiclass for cmov's, but don't start using it yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115692 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86InstrCMovSetCC.td b/lib/Target/X86/X86InstrCMovSetCC.td index 78b7507ef08..9853a0cd611 100644 --- a/lib/Target/X86/X86InstrCMovSetCC.td +++ b/lib/Target/X86/X86InstrCMovSetCC.td @@ -12,7 +12,46 @@ // //===----------------------------------------------------------------------===// -// FIXME: Someone please sprinkle some defm's in here! + +// SetCC instructions. +multiclass CMOV opc, string Mnemonic, PatLeaf CondNode> { + let Uses = [EFLAGS], Predicates = [HasCMov], Constraints = "$src1 = $dst", + isCommutable = 1 in { + def rr16 : I, + TB, OpSize; + def rr32 : I, + TB; + def rr64 :RI, + TB; + } + + let Uses = [EFLAGS], Predicates = [HasCMov], Constraints = "$src1 = $dst"in { + def rm16 : I, TB, OpSize; + def rm32 : I, TB; + def rm64 :RI, TB; + } // Uses = [EFLAGS], Predicates = [HasCMov], Constraints = "$src1 = $dst" +} // end multiclass + +//defm CMOVBE : CMOV<0x46, "cmovbe", X86_COND_BE>; + let Constraints = "$src1 = $dst" in {