[PATCH] D16452: [mips][microMIPS] Implement DBITSWAP, DLSA and LWUPC and add tests for AUI instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Tue May 10 02:51:05 PDT 2016


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

Some small nits.

Thanks,
Simon


================
Comment at: lib/Target/Mips/MicroMips64r6InstrFormats.td:169-170
@@ +168,4 @@
+  let Inst{31-26} = 0b010110;
+  let Inst{25-21} = rs;
+  let Inst{20-16} = rt;
+  let Inst{15-11} = rd;
----------------
Nit, bits 25-21 encode rt, 20-16 encode rs.

================
Comment at: lib/Target/Mips/MicroMips64r6InstrFormats.td:178-184
@@ +177,9 @@
+class PCREL_1ROFFSET19_FM_MMR6 {
+  bits<5> rs;
+  bits<19> offset;
+
+  bits<32> Inst;
+
+  let Inst{31-26} = 0b011110;
+  let Inst{25-21} = rs;
+  let Inst{20-19} = 0b10;
----------------
Nit: rs should be rt here.

================
Comment at: lib/Target/Mips/MicroMips64r6InstrInfo.td:188-190
@@ +187,5 @@
+class LWUPC_MM64R6_DESC : MMR6Arch<"lwupc">, MipsR6Inst {
+  dag OutOperandList = (outs GPR64Opnd:$rs);
+  dag InOperandList = (ins simm19_lsl2:$offset);
+  string AsmString = "lwupc\t$rs, $offset";
+  list<dag> Pattern = [];
----------------
Nit, rs -> rt.

================
Comment at: lib/Target/Mips/MicroMips64r6InstrInfo.td:194-202
@@ +193,11 @@
+}
+
+class LOAD_STORE_MM64R6_DESC_BASE<string instr_asm, RegisterOperand GPROpnd,
+                                 Operand ImmOpnd>
+    : MMR6Arch<instr_asm>, MipsR6Inst {
+  dag OutOperandList = (outs GPROpnd:$rt);
+  dag InOperandList = (ins ImmOpnd:$addr);
+  string AsmString = !strconcat(instr_asm, "\t$rt, $addr");
+  let DecoderMethod = "DecodeMemMMImm9";
+}
+
----------------
I believe this is redundant, I'm not seeing anything use this.

================
Comment at: test/MC/Mips/micromips64r6/invalid.s:233
@@ +232,2 @@
+  dlsa $3, $4, $5, -1          # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected immediate in range 1 .. 4
+  dlsa $3, $4, $5, 0           # CHECK: :[[@LINE]]:{{[0-9]+}}: error: expected immediate in range 1 .. 4
----------------
Check that a signed immediate offset > 19 bits is rejected for lwupc.
Check that a signed immediate > 16 bits is rejected for aui.



http://reviews.llvm.org/D16452





More information about the llvm-commits mailing list