[PATCH] D22347: [mips][microMIPS] Implement CFC1, CFC2, CTC1 and CTC2 instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 07:45:31 PDT 2016


sdardis accepted this revision.
sdardis added a comment.
This revision is now accepted and ready to land.

LGTM with the nit & instruction itinerary defined.


================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:664-671
@@ -663,2 +663,10 @@
                  ISA_MICROMIPS32_NOT_MIPS32R6;
+                 let AdditionalPredicates = [InMicroMips] in {
+def CFC2_MM : InstSE<(outs GPR32Opnd:$rt), (ins COP2Opnd:$impl),
+                     "cfc2\t$rt, $impl", [], NoItinerary, FrmFR, "cfc2">,
+              POOL32A_CFTC2_FM_MM<0b1100110100>;
+def CTC2_MM : InstSE<(outs COP2Opnd:$impl), (ins GPR32Opnd:$rt),
+                     "ctc2\t$rt, $impl", [], NoItinerary, FrmFR, "ctc2">,
+              POOL32A_CFTC2_FM_MM<0b1101110100>;
+}
 }
----------------
The let line should have the same indentation as the defs above. The defs inside the let block should be indented by a further two spaces. Similar to the change you made in MipsInstrFPU.td

Also, can you define the instruction itinerary for ctc2/cfc2 and use it here? You can copy the details from II_CTC1/II_CFC2.


https://reviews.llvm.org/D22347





More information about the llvm-commits mailing list