[PATCH] [mips][microMIPS] Implement SLL and NOP instructions
Daniel Sanders
daniel.sanders at imgtec.com
Mon Jun 22 03:37:42 PDT 2015
================
Comment at: lib/Target/Mips/MicroMips32r6InstrFormats.td:267-268
@@ +266,4 @@
+ let Inst{31-26} = 0;
+ let Inst{25-21} = rd;
+ let Inst{20-16} = rt;
+ let Inst{15-11} = shamt;
----------------
The documentation calls them 'rt' and 'rs' respectively. That doesn't sound right though, 'rd' and 'rt' sound more likely.
================
Comment at: lib/Target/Mips/MipsInstrInfo.td:425-436
@@ -424,2 +424,14 @@
+def MipsUImm5AsmOperand : AsmOperandClass {
+ let Name = "UImm5";
+ let RenderMethod = "addImmOperands";
+ let ParserMethod = "parseImm";
+ let PredicateMethod = "isUImm<5>";
+}
+
+def uimm5opnd : Operand<i32> {
+ let PrintMethod = "printUnsignedImm";
+ let ParserMatchClass = MipsUImm5AsmOperand;
+}
+
def uimm6 : Operand<i32> {
----------------
Please use the existing uimm5 operand. You can add the range checking in a separate patch (either before or after) this one.
http://reviews.llvm.org/D10474
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list