[PATCH] D16625: [mips][micromips] Implement LD, LLD, LWU, SD, DSRL, DSRL32 and DSRLV instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 23 06:16:09 PDT 2016


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

LGTM, aside some from nits.


================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:966
@@ +965,3 @@
+  def LWU_MM : MMRel, LoadMM<"lwu", GPR32Opnd, zextloadi32, II_LWU,
+                                 mem_simm12>, LL_FM_MM<0xe>,
+               ISA_MICROMIPS32_NOT_MIPS32R6;
----------------
Line up mem_simm12 under "lwu".

================
Comment at: lib/Target/Mips/Mips64InstrInfo.td:692-703
@@ -687,13 +691,14 @@
                     ISA_MIPS3;
-def : MipsInstAlias<"dsrl $rd, $rt, $rs",
-                    (DSRLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
-                    ISA_MIPS3;
-
+let AdditionalPredicates = [NotInMicroMips] in {
+  def : MipsInstAlias<"dsrl $rd, $rt, $rs",
+                      (DSRLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
+                      ISA_MIPS3;
+}
 // Two operand (implicit 0 selector) versions:
 let AdditionalPredicates = [NotInMicroMips] in {
   def : MipsInstAlias<"dmtc0 $rt, $rd",
                       (DMTC0 COP0Opnd:$rd, GPR64Opnd:$rt, 0), 0>;
   def : MipsInstAlias<"dmfc0 $rt, $rd",
                       (DMFC0 GPR64Opnd:$rt, COP0Opnd:$rd, 0), 0>;
 }
 def : MipsInstAlias<"dmfc2 $rt, $rd", (DMFC2 GPR64Opnd:$rt, COP2Opnd:$rd, 0), 0>;
----------------
Join these block together.

================
Comment at: lib/Target/Mips/MipsInstrInfo.td:942-949
@@ -941,1 +941,10 @@
 
+def MipsMemSimm12AsmOperand : AsmOperandClass {
+  let Name = "MemOffsetSimm12";
+  let SuperClasses = [MipsMemAsmOperand];
+  let RenderMethod = "addMemOperands";
+  let ParserMethod = "parseMemOperand";
+  let PredicateMethod = "isMemWithSimmOffset<12>";
+  let DiagnosticType = "MemSImm12";
+}
+
----------------
Move this block to after MipsMemSimm10AsmOperand.


http://reviews.llvm.org/D16625





More information about the llvm-commits mailing list