Add instruction encodings / disassembler support for 2rus instructions.
[oota-llvm.git] / lib / Target / XCore / XCoreInstrFormats.td
index b3c209328f94caa0b1ee59141d734a306751fe27..e65d477b7cd044ba7706bc086b1f8188722ddbb2 100644 (file)
@@ -43,8 +43,17 @@ class _FL3R<dag outs, dag ins, string asmstr, list<dag> pattern>
     : InstXCore<4, outs, ins, asmstr, pattern> {
 }
 
-class _F2RUS<dag outs, dag ins, string asmstr, list<dag> pattern>
+class _F2RUS<bits<5> opc, dag outs, dag ins, string asmstr, list<dag> pattern>
     : InstXCore<2, outs, ins, asmstr, pattern> {
+  let Inst{15-11} = opc;
+  let DecoderMethod = "Decode2RUSInstruction";
+}
+
+// 2RUS with bitp operand
+class _F2RUSBitp<bits<5> opc, dag outs, dag ins, string asmstr,
+                 list<dag> pattern>
+    : _F2RUS<opc, outs, ins, asmstr, pattern> {
+  let DecoderMethod = "Decode2RUSBitpInstruction";
 }
 
 class _FL2RUS<dag outs, dag ins, string asmstr, list<dag> pattern>