[PATCH] D11798: [mips][microMIPS] Implement BOVC, BNVC, EXT, INS and JALRC instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Tue May 31 06:57:19 PDT 2016


sdardis requested changes to this revision.
sdardis added a comment.
This revision now requires changes to proceed.

Needs one more thing: lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp:encodeInstruction/LowerCompactBranch needs to be extended so that the microMIPS bovc/bnvc have their constraints of $rs >= $rt upheld.

You don't need to enforce this constraint for assembly parsing as other tools will silently swap the operands around.


================
Comment at: lib/Target/Mips/MicroMipsInstrInfo.td:891
@@ -891,1 +890,3 @@
+  def JR_MM : MMRel, IndirectBranch<"jr", GPR32Opnd>, JR_FM_MM<0x3c>,
+              ISA_MICROMIPS32_NOT_MIPS32R6;
   def JALR_MM : JumpLinkReg<"jalr", GPR32Opnd>, JALR_FM_MM<0x03c>;
----------------
hvarga wrote:
> I think that `hasMips64r6()` is redundant since predicates are cumulative. So I think it is ok to leave this as is. Do you agree?
You're right. It's fine as is.

================
Comment at: test/MC/Mips/micromips32r6/valid.s:347
@@ +346,2 @@
+  bovc $2, $4, 24          # CHECK: bovc $2, $4, 24        # encoding: [0x74,0x44,0x00,0x0c]
+  bnvc $2, $4, 24          # CHECK: bnvc $2, $4, 24        # encoding: [0x7c,0x44,0x00,0x0c]
----------------
Add tests where the constraint $rs >= $rt is not upheld, i.e. "bovc $4, $2, 24" but the encoding is the same as the $rs >= $rt case.


http://reviews.llvm.org/D11798





More information about the llvm-commits mailing list