Add a thumb2 pass to insert IT blocks.
[oota-llvm.git] / lib / Target / ARM / ARMInstrThumb2.td
index be738310729b93c2139470d931b03607ee4b5801..34ce53f97f13127165614c0ca651f3cfc247efa1 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+// IT block predicate field
+def it_pred : Operand<i32> {
+  let PrintMethod = "printPredicateOperand";
+}
+
+// IT block condition mask
+def it_mask : Operand<i32> {
+  let PrintMethod = "printThumbITMask";
+}
+
 // Shifted operands. No register controlled shifts for Thumb2.
 // Note: We do not support rrx shifted operands yet.
 def t2_so_reg : Operand<i32>,    // reg imm
@@ -1121,6 +1131,12 @@ def t2Bcc : T2I<(outs), (ins brtarget:$target),
                 "b", " $target",
                 [/*(ARMbrcond bb:$target, imm:$cc)*/]>;
 
+
+// IT block
+def t2IT : Thumb2XI<(outs), (ins it_pred:$cc, it_mask:$mask),
+                    AddrModeNone, Size2Bytes,
+                    "it$mask $cc", "", []>;
+
 //===----------------------------------------------------------------------===//
 // Non-Instruction Patterns
 //