|
@@ -11,6 +11,8 @@
|
|
//
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
+include "Mips32r6InstrFormats.td"
|
|
|
|
+
|
|
// Notes about removals/changes from MIPS32r6:
|
|
// Notes about removals/changes from MIPS32r6:
|
|
// Unclear: ssnop
|
|
// Unclear: ssnop
|
|
// Reencoded: cache, pref
|
|
// Reencoded: cache, pref
|
|
@@ -52,6 +54,41 @@
|
|
// Removed: teqi, tgei, tgeiu, tlti, tltiu, tnei
|
|
// Removed: teqi, tgei, tgeiu, tlti, tltiu, tnei
|
|
// Rencoded: [ls][wd]c2
|
|
// Rencoded: [ls][wd]c2
|
|
|
|
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+//
|
|
|
|
+// Instruction Encodings
|
|
|
|
+//
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+
|
|
|
|
+class MUH_ENC : SPECIAL_3R_FM<0b00011, 0b011000>;
|
|
|
|
+class MUHU_ENC : SPECIAL_3R_FM<0b00011, 0b011001>;
|
|
|
|
+class MUL_R6_ENC : SPECIAL_3R_FM<0b00010, 0b011000>;
|
|
|
|
+class MULU_ENC : SPECIAL_3R_FM<0b00010, 0b011001>;
|
|
|
|
+
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+//
|
|
|
|
+// Instruction Descriptions
|
|
|
|
+//
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+
|
|
|
|
+class MUL_R6_DESC_BASE<string instr_asm, RegisterOperand GPROpnd> {
|
|
|
|
+ dag OutOperandList = (outs GPROpnd:$rd);
|
|
|
|
+ dag InOperandList = (ins GPROpnd:$rs, GPROpnd:$rt);
|
|
|
|
+ string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt");
|
|
|
|
+ list<dag> Pattern = [];
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+class MUH_DESC : MUL_R6_DESC_BASE<"muh", GPR32Opnd>;
|
|
|
|
+class MUHU_DESC : MUL_R6_DESC_BASE<"muhu", GPR32Opnd>;
|
|
|
|
+class MUL_R6_DESC : MUL_R6_DESC_BASE<"mul", GPR32Opnd>;
|
|
|
|
+class MULU_DESC : MUL_R6_DESC_BASE<"mulu", GPR32Opnd>;
|
|
|
|
+
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+//
|
|
|
|
+// Instruction Definitions
|
|
|
|
+//
|
|
|
|
+//===----------------------------------------------------------------------===//
|
|
|
|
+
|
|
def ADDIUPC;
|
|
def ADDIUPC;
|
|
def ALIGN; // Known as as BALIGN in DSP ASE
|
|
def ALIGN; // Known as as BALIGN in DSP ASE
|
|
def ALUIPC;
|
|
def ALUIPC;
|
|
@@ -106,10 +143,10 @@ def MIN_D;
|
|
def MOD;
|
|
def MOD;
|
|
def MODU;
|
|
def MODU;
|
|
def MSUBF;
|
|
def MSUBF;
|
|
-def MUH;
|
|
|
|
-def MUHU;
|
|
|
|
-def MUL_R6; // Not to be confused with the old mul
|
|
|
|
-def MULU;
|
|
|
|
|
|
+def MUH : MUH_ENC, MUH_DESC, ISA_MIPS32R6;
|
|
|
|
+def MUHU : MUHU_ENC, MUHU_DESC, ISA_MIPS32R6;
|
|
|
|
+def MUL_R6 : MUL_R6_ENC, MUL_R6_DESC, ISA_MIPS32R6;
|
|
|
|
+def MULU : MULU_ENC, MULU_DESC, ISA_MIPS32R6;
|
|
def NAL; // BAL with rd=0
|
|
def NAL; // BAL with rd=0
|
|
def RINT_D;
|
|
def RINT_D;
|
|
def RINT_S;
|
|
def RINT_S;
|