[PATCH] D11219: [mips][microMIPS] Implement JALRC16, JRCADDIUSP and JRC16 instructions

Daniel Sanders via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 09:39:27 PDT 2015


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

LGTM with a couple nits.

There's also a comment for a later patch.


================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:983
@@ +982,3 @@
+      return false;
+    int64_t val = getConstantImm();
+    return val % 4 == 0 && val >= 0 && val <= 124;
----------------
Variables begin with a capital.

================
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:984
@@ +983,3 @@
+    int64_t val = getConstantImm();
+    return val % 4 == 0 && val >= 0 && val <= 124;
+  }
----------------
Thanks for fixing this.

I haven't tried this function myself but MathExtras.h provides an isShiftedUInt that should do the same thing as this expression. If that does the job then we should use it, otherwise this is fine.

================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:412
@@ -403,3 +411,3 @@
   MicroMipsInst16<(outs), (ins RO:$rs), !strconcat(opstr, "\t$rs"),
-           [(MipsJmpLink RO:$rs)], II_JALR, FrmR> {
+           [(MipsJmpLink RO:$rs)], II_JALR, FrmR>, PredicateControl {
   let isCall = 1;
----------------
Thanks. We should move PredicateControl further up the hierarchy in a later patch.


http://reviews.llvm.org/D11219





More information about the llvm-commits mailing list