MIPS DSP: add support for extract-word instructions.
[oota-llvm.git] / lib / Target / Mips / MipsDSPInstrFormats.td
index d9bcccc617617c80266f81f5e41694e205ac097c..f57c55a55745bf1588d9deac54eda963302191e1 100644 (file)
@@ -23,3 +23,19 @@ def REGIMM_OPCODE : Field6<0b000001>;
 class DSPInst : MipsInst<(outs), (ins), "", [], NoItinerary, FrmOther> {
   let Predicates = [HasDSP];
 }
+
+// EXTR.W sub-class format (type 1).
+class EXTR_W_TY1_FMT<bits<5> op> : DSPInst {
+  bits<5> rt;
+  bits<2> ac;
+  bits<5> shift_rs;
+
+  let Opcode = SPECIAL3_OPCODE.V;
+
+  let Inst{25-21} = shift_rs;
+  let Inst{20-16} = rt;
+  let Inst{15-13} = 0;
+  let Inst{12-11} = ac;
+  let Inst{10-6} = op;
+  let Inst{5-0} = 0b111000;
+}