[PATCH] [mips][microMIPS] Implement ERET and ERETNC instructions

Daniel Sanders daniel.sanders at imgtec.com
Mon Jun 1 06:44:01 PDT 2015


================
Comment at: lib/Target/Mips/MicroMips32r6InstrFormats.td:186-204
@@ -185,1 +185,20 @@
 }
+
+class ERET_FM_MMR6<string instr_asm, bits<10> funct> : MMR6Arch<instr_asm> {
+  bits<32> Inst;
+
+  let Inst{31-26} = 0x00;
+  let Inst{25-16} = 0x00;
+  let Inst{15-6}  = funct;
+  let Inst{5-0}   = 0x3c;
+}
+
+class ERETNC_FM_MMR6<string instr_asm, bits<10> funct> : MMR6Arch<instr_asm> {
+  bits<32> Inst;
+
+  let Inst{31-26} = 0x00;
+  let Inst{25-17} = 0x00;
+  let Inst{16-16} = 0x01;
+  let Inst{15-6}  = funct;
+  let Inst{5-0}   = 0x3c;
+}
----------------
dsanders wrote:
> dsanders wrote:
> > Nit: Each of these two formats only have one instruction using them. As such, we should remove the 'funct' argument and define the number here.
> One more nit. 'instr_asm' is unused and should be removed.
> One more nit. 'instr_asm' is unused and should be removed.

Please ignore that. I was thinking of normal MIPS which doesn't have instruction mnemonics in the formats.

http://reviews.llvm.org/D10091

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list