Index: lib/Target/Mips/MicroMips32r6InstrFormats.td =================================================================== --- lib/Target/Mips/MicroMips32r6InstrFormats.td +++ lib/Target/Mips/MicroMips32r6InstrFormats.td @@ -317,3 +317,64 @@ let Inst{8-0} = offset; } +class POOL32F_MINMAX_FM fmt, bits<9> funct> + : MMR6Arch, MipsR6Inst { + bits<5> ft; + bits<5> fs; + bits<5> fd; + + bits<32> Inst; + + let Inst{31-26} = 0b010101; + let Inst{25-21} = ft; + let Inst{20-16} = fs; + let Inst{15-11} = fd; + let Inst{10-9} = fmt; + let Inst{8-0} = funct; +} + +class POOL32F_CMP_FM format, FIELD_CMP_COND Cond> + : MMR6Arch, MipsR6Inst { + bits<5> ft; + bits<5> fs; + bits<5> fd; + + bits<32> Inst; + + let Inst{31-26} = 0b010101; + let Inst{25-21} = ft; + let Inst{20-16} = fs; + let Inst{15-11} = fd; + let Inst{10-6} = Cond.Value; + let Inst{5-0} = format; +} + +class POOL32F_CVT_LW_FM funct> + : MMR6Arch, MipsR6Inst { + bits<5> ft; + bits<5> fs; + + bits<32> Inst; + let Inst{31-26} = 0b010101; + let Inst{25-21} = ft; + let Inst{20-16} = fs; + let Inst{15} = 0; + let Inst{14} = fmt; + let Inst{13-6} = funct; + let Inst{5-0} = 0b111011; +} + +class POOL32F_CVT_DS_FM fmt, bits<7> funct> + : MMR6Arch, MipsR6Inst { + bits<5> ft; + bits<5> fs; + + bits<32> Inst; + let Inst{31-26} = 0b010101; + let Inst{25-21} = ft; + let Inst{20-16} = fs; + let Inst{15} = 0; + let Inst{14-13} = fmt; + let Inst{12-6} = funct; + let Inst{5-0} = 0b111011; +} Index: lib/Target/Mips/MicroMips32r6InstrInfo.td =================================================================== --- lib/Target/Mips/MicroMips32r6InstrInfo.td +++ lib/Target/Mips/MicroMips32r6InstrInfo.td @@ -110,6 +110,27 @@ list Defs = [RA]; } +/// Floating Point Instructions +class MAX_S_MMR6_ENC : POOL32F_MINMAX_FM<"max.s", 0, 0b000001011>; +class MAX_D_MMR6_ENC : POOL32F_MINMAX_FM<"max.d", 1, 0b000001011>; +class MAXA_S_MMR6_ENC : POOL32F_MINMAX_FM<"maxa.s", 0, 0b000101011>; +class MAXA_D_MMR6_ENC : POOL32F_MINMAX_FM<"maxa.d", 1, 0b000101011>; +class MIN_S_MMR6_ENC : POOL32F_MINMAX_FM<"min.s", 0, 0b000000011>; +class MIN_D_MMR6_ENC : POOL32F_MINMAX_FM<"min.d", 1, 0b000000011>; +class MINA_S_MMR6_ENC : POOL32F_MINMAX_FM<"mina.s", 0, 0b000100011>; +class MINA_D_MMR6_ENC : POOL32F_MINMAX_FM<"mina.d", 1, 0b000100011>; + +class CVT_L_S_MMR6_ENC : POOL32F_CVT_LW_FM<"cvt.l.s", 0, 0b00000100>; +class CVT_L_D_MMR6_ENC : POOL32F_CVT_LW_FM<"cvt.l.d", 1, 0b00000100>; +class CVT_W_S_MMR6_ENC : POOL32F_CVT_LW_FM<"cvt.w.s", 0, 0b00100100>; +class CVT_W_D_MMR6_ENC : POOL32F_CVT_LW_FM<"cvt.w.d", 1, 0b00100100>; +class CVT_D_S_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.d.s", 0, 0b1001101>; +class CVT_D_W_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.d.w", 1, 0b1001101>; +class CVT_D_L_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.d.l", 2, 0b1001101>; +class CVT_S_D_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.d", 0, 0b1101101>; +class CVT_S_W_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.w", 1, 0b1101101>; +class CVT_S_L_MMR6_ENC : POOL32F_CVT_DS_FM<"cvt.s.l", 2, 0b1101101>; + //===----------------------------------------------------------------------===// // // Operand Definitions @@ -311,6 +332,101 @@ class SW_MMR6_DESC : Store<"sw", GPR32Opnd>; class SWE_MMR6_DESC : SWE_MMR6_DESC_BASE<"swe", GPR32Opnd, mem_simm9gpr>; +/// Floating Point Instructions +class MAX_S_MMR6_DESC : MAX_MIN_DESC_BASE<"max.s", FGR32Opnd>, HARDFLOAT; +class MAX_D_MMR6_DESC : MAX_MIN_DESC_BASE<"max.d", FGR64Opnd>, HARDFLOAT; +class MIN_S_MMR6_DESC : MAX_MIN_DESC_BASE<"min.s", FGR32Opnd>, HARDFLOAT; +class MIN_D_MMR6_DESC : MAX_MIN_DESC_BASE<"min.d", FGR64Opnd>, HARDFLOAT; + +class MAXA_S_MMR6_DESC : MAX_MIN_DESC_BASE<"maxa.s", FGR32Opnd>, HARDFLOAT; +class MAXA_D_MMR6_DESC : MAX_MIN_DESC_BASE<"maxa.d", FGR64Opnd>, HARDFLOAT; +class MINA_S_MMR6_DESC : MAX_MIN_DESC_BASE<"mina.s", FGR32Opnd>, HARDFLOAT; +class MINA_D_MMR6_DESC : MAX_MIN_DESC_BASE<"mina.d", FGR64Opnd>, HARDFLOAT; + +class CVT_MMR6_DESC_BASE : HARDFLOAT, NeverHasSideEffects { + dag OutOperandList = (outs DstRC:$ft); + dag InOperandList = (ins SrcRC:$fs); + string AsmString = !strconcat(instr_asm, "\t$ft, $fs"); + list Pattern = [(set DstRC:$ft, (OpNode SrcRC:$fs))]; + InstrItinClass Itinerary = Itin; + Format Form = FrmFR; +} + +class CVT_L_S_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.l.s", FGR64Opnd, FGR32Opnd, + II_CVT>; +class CVT_L_D_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.l.d", FGR64Opnd, FGR64Opnd, + II_CVT>; +class CVT_W_S_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.w.s", FGR32Opnd, FGR32Opnd, + II_CVT>; +class CVT_W_D_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.w.d", FGR32Opnd, AFGR64Opnd, + II_CVT>; +class CVT_D_S_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.d.s", FGR32Opnd, AFGR64Opnd, + II_CVT>; +class CVT_D_W_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.d.w", FGR32Opnd, AFGR64Opnd, + II_CVT>; +class CVT_D_L_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.d.l", FGR64Opnd, FGR64Opnd, + II_CVT>, FGR_64; +class CVT_S_D_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.s.d", AFGR64Opnd, FGR32Opnd, + II_CVT>; +class CVT_S_W_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.s.w", FGR32Opnd, FGR32Opnd, + II_CVT>; +class CVT_S_L_MMR6_DESC : CVT_MMR6_DESC_BASE<"cvt.s.l", FGR64Opnd, FGR32Opnd, + II_CVT>, FGR_64; + +multiclass CMP_CC_MMR6 format, string Typestr, + RegisterOperand FGROpnd> { + def CMP_AF_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"af", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_UN_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"un", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_EQ_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"eq", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_UEQ_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"ueq", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_LT_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"lt", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_ULT_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"ult", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_LE_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"le", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_ULE_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"ule", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SAF_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"saf", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SUN_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"sun", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SEQ_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"seq", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SUEQ_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"sueq", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SLT_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"slt", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SULT_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"sult", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SLE_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"sle", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; + def CMP_SULE_#NAME : POOL32F_CMP_FM, CMP_CONDN_DESC_BASE<"sule", Typestr, FGROpnd>, + HARDFLOAT, R6MMR6Rel, ISA_MICROMIPS32R6; +} + //===----------------------------------------------------------------------===// // // Instruction Definitions @@ -388,6 +504,41 @@ let DecoderMethod = "DecodeMemMMImm9" in { def SWE_MMR6 : StdMMR6Rel, SWE_MMR6_DESC, SWE_MMR6_ENC, ISA_MICROMIPS32R6; } +/// Floating Point Instructions +def MAX_S_MMR6 : R6MMR6Rel, MAX_S_MMR6_ENC, MAX_S_MMR6_DESC, ISA_MICROMIPS32R6; +def MAX_D_MMR6 : R6MMR6Rel, MAX_D_MMR6_ENC, MAX_D_MMR6_DESC, ISA_MICROMIPS32R6; +def MIN_S_MMR6 : R6MMR6Rel, MIN_S_MMR6_ENC, MIN_S_MMR6_DESC, ISA_MICROMIPS32R6; +def MIN_D_MMR6 : R6MMR6Rel, MIN_D_MMR6_ENC, MIN_D_MMR6_DESC, ISA_MICROMIPS32R6; +def MAXA_S_MMR6 : R6MMR6Rel, MAXA_S_MMR6_ENC, MAXA_S_MMR6_DESC, + ISA_MICROMIPS32R6; +def MAXA_D_MMR6 : R6MMR6Rel, MAXA_D_MMR6_ENC, MAXA_D_MMR6_DESC, + ISA_MICROMIPS32R6; +def MINA_S_MMR6 : R6MMR6Rel, MINA_S_MMR6_ENC, MINA_S_MMR6_DESC, + ISA_MICROMIPS32R6; +def MINA_D_MMR6 : R6MMR6Rel, MINA_D_MMR6_ENC, MINA_D_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_L_S_MMR6 : StdMMR6Rel, CVT_L_S_MMR6_ENC, CVT_L_S_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_L_D_MMR6 : StdMMR6Rel, CVT_L_D_MMR6_ENC, CVT_L_D_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_W_S_MMR6 : StdMMR6Rel, CVT_W_S_MMR6_ENC, CVT_W_S_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_W_D_MMR6 : StdMMR6Rel, CVT_W_D_MMR6_ENC, CVT_W_D_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_D_S_MMR6 : StdMMR6Rel, CVT_D_S_MMR6_ENC, CVT_D_S_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_D_W_MMR6 : StdMMR6Rel, CVT_D_W_MMR6_ENC, CVT_D_W_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_D_L_MMR6 : StdMMR6Rel, CVT_D_L_MMR6_ENC, CVT_D_L_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_S_D_MMR6 : StdMMR6Rel, CVT_S_D_MMR6_ENC, CVT_S_D_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_S_W_MMR6 : StdMMR6Rel, CVT_S_W_MMR6_ENC, CVT_S_W_MMR6_DESC, + ISA_MICROMIPS32R6; +def CVT_S_L_MMR6 : StdMMR6Rel, CVT_S_L_MMR6_ENC, CVT_S_L_MMR6_DESC, + ISA_MICROMIPS32R6; +defm S_MMR6 : CMP_CC_MMR6<0b000101, "s", FGR32Opnd>; +defm D_MMR6 : CMP_CC_MMR6<0b010101, "d", FGR64Opnd>; } //===----------------------------------------------------------------------===// Index: lib/Target/Mips/Mips32r6InstrInfo.td =================================================================== --- lib/Target/Mips/Mips32r6InstrInfo.td +++ lib/Target/Mips/Mips32r6InstrInfo.td @@ -186,6 +186,7 @@ multiclass CMP_CC_M { + let AdditionalPredicates = [NotInMicroMips] in { def CMP_F_#NAME : COP1_CMP_CONDN_FM, CMP_CONDN_DESC_BASE<"af", Typestr, FGROpnd>, ISA_MIPS32R6, HARDFLOAT; @@ -234,6 +235,7 @@ def CMP_SULE_#NAME : COP1_CMP_CONDN_FM, CMP_CONDN_DESC_BASE<"sule", Typestr, FGROpnd>, ISA_MIPS32R6, HARDFLOAT; + } } //===----------------------------------------------------------------------===// @@ -704,6 +706,7 @@ def LWUPC : LWUPC_ENC, LWUPC_DESC, ISA_MIPS32R6; def MADDF_S : MADDF_S_ENC, MADDF_S_DESC, ISA_MIPS32R6, HARDFLOAT; def MADDF_D : MADDF_D_ENC, MADDF_D_DESC, ISA_MIPS32R6, HARDFLOAT; +let AdditionalPredicates = [NotInMicroMips] in { def MAXA_D : MAXA_D_ENC, MAXA_D_DESC, ISA_MIPS32R6, HARDFLOAT; def MAXA_S : MAXA_S_ENC, MAXA_S_DESC, ISA_MIPS32R6, HARDFLOAT; def MAX_D : MAX_D_ENC, MAX_D_DESC, ISA_MIPS32R6, HARDFLOAT; @@ -712,6 +715,7 @@ def MINA_S : MINA_S_ENC, MINA_S_DESC, ISA_MIPS32R6, HARDFLOAT; def MIN_D : MIN_D_ENC, MIN_D_DESC, ISA_MIPS32R6, HARDFLOAT; def MIN_S : MIN_S_ENC, MIN_S_DESC, ISA_MIPS32R6, HARDFLOAT; +} def MOD : R6MMR6Rel, MOD_ENC, MOD_DESC, ISA_MIPS32R6; def MODU : R6MMR6Rel, MODU_ENC, MODU_DESC, ISA_MIPS32R6; def MSUBF_S : MSUBF_S_ENC, MSUBF_S_DESC, ISA_MIPS32R6, HARDFLOAT; Index: lib/Target/Mips/MipsInstrFPU.td =================================================================== --- lib/Target/Mips/MipsInstrFPU.td +++ lib/Target/Mips/MipsInstrFPU.td @@ -305,10 +305,12 @@ def CVT_S_W : MMRel, ABSS_FT<"cvt.s.w", FGR32Opnd, FGR32Opnd, II_CVT>, ABSS_FM<0x20, 20>; +let AdditionalPredicates = [NotInMicroMips] in{ def CVT_L_S : MMRel, ABSS_FT<"cvt.l.s", FGR64Opnd, FGR32Opnd, II_CVT>, ABSS_FM<0x25, 16>, INSN_MIPS3_32R2; def CVT_L_D64: MMRel, ABSS_FT<"cvt.l.d", FGR64Opnd, FGR64Opnd, II_CVT>, ABSS_FM<0x25, 17>, INSN_MIPS3_32R2; +} def CVT_S_D32 : MMRel, ABSS_FT<"cvt.s.d", FGR32Opnd, AFGR64Opnd, II_CVT>, ABSS_FM<0x20, 17>, FGR_32; @@ -320,8 +322,10 @@ let DecoderNamespace = "Mips64" in { def CVT_S_D64 : ABSS_FT<"cvt.s.d", FGR32Opnd, FGR64Opnd, II_CVT>, ABSS_FM<0x20, 17>, FGR_64; + let AdditionalPredicates = [NotInMicroMips] in{ def CVT_S_L : ABSS_FT<"cvt.s.l", FGR32Opnd, FGR64Opnd, II_CVT>, ABSS_FM<0x20, 21>, FGR_64; + } def CVT_D64_W : ABSS_FT<"cvt.d.w", FGR64Opnd, FGR32Opnd, II_CVT>, ABSS_FM<0x21, 20>, FGR_64; def CVT_D64_S : ABSS_FT<"cvt.d.s", FGR64Opnd, FGR32Opnd, II_CVT>, Index: test/MC/Disassembler/Mips/micromips32r6.txt =================================================================== --- test/MC/Disassembler/Mips/micromips32r6.txt +++ test/MC/Disassembler/Mips/micromips32r6.txt @@ -115,3 +115,103 @@ 0xf8,0xa6,0x00,0x04 # CHECK: sw $5, 4($6) 0x60,0xa4,0xae,0x08 # CHECK: swe $5, 8($4) + +0x54 0x64 0x28 0x0b # CHECK: max.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x0b # CHECK: max.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x2b # CHECK: maxa.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x2b # CHECK: maxa.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x03 # CHECK: min.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x03 # CHECK: min.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x23 # CHECK: mina.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x23 # CHECK: mina.d $f5, $f4, $f3 + +0x54 0x83 0x10 0x05 # CHECK: cmp.af.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x45 # CHECK: cmp.un.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x85 # CHECK: cmp.eq.s $f2, $f3, $f4 + +0x54 0x83 0x10 0xc5 # CHECK: cmp.ueq.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x05 # CHECK: cmp.lt.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x45 # CHECK: cmp.ult.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x85 # CHECK: cmp.le.s $f2, $f3, $f4 + +0x54 0x83 0x11 0xc5 # CHECK: cmp.ule.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x05 # CHECK: cmp.saf.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x45 # CHECK: cmp.sun.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x85 # CHECK: cmp.seq.s $f2, $f3, $f4 + +0x54 0x83 0x12 0xc5 # CHECK: cmp.sueq.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x05 # CHECK: cmp.slt.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x45 # CHECK: cmp.sult.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x85 # CHECK: cmp.sle.s $f2, $f3, $f4 + +0x54 0x83 0x13 0xc5 # CHECK: cmp.sule.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x15 # CHECK: cmp.af.d $f2, $f3, $f4 + +0x54 0x83 0x10 0x55 # CHECK: cmp.un.d $f2, $f3, $f4 + +0x54 0x83 0x10 0x95 # CHECK: cmp.eq.d $f2, $f3, $f4 + +0x54 0x83 0x10 0xd5 # CHECK: cmp.ueq.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x15 # CHECK: cmp.lt.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x55 # CHECK: cmp.ult.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x95 # CHECK: cmp.le.d $f2, $f3, $f4 + +0x54 0x83 0x11 0xd5 # CHECK: cmp.ule.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x15 # CHECK: cmp.saf.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x55 # CHECK: cmp.sun.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x95 # CHECK: cmp.seq.d $f2, $f3, $f4 + +0x54 0x83 0x12 0xd5 # CHECK: cmp.sueq.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x15 # CHECK: cmp.slt.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x55 # CHECK: cmp.sult.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x95 # CHECK: cmp.sle.d $f2, $f3, $f4 + +0x54 0x83 0x13 0xd5 # CHECK: cmp.sule.d $f2, $f3, $f4 + +0x54 0x64 0x01 0x3b # CHECK: cvt.l.s $f3, $f4 + +0x54 0x64 0x41 0x3b # CHECK: cvt.l.d $f3, $f4 + +0x54 0x64 0x09 0x3b # CHECK: cvt.w.s $f3, $f4 + +0x54 0x64 0x49 0x3b # CHECK: cvt.w.d $f3, $f4 + +0x54 0x44 0x13 0x7b # CHECK: cvt.d.s $f2, $f4 + +0x54 0x44 0x33 0x7b # CHECK: cvt.d.w $f2, $f4 + +0x54 0x44 0x53 0x7b # CHECK: cvt.d.l $f2, $f4 + +0x54,0x44,0x1b,0x7b # CHECK: cvt.s.d $f2, $f4 + +0x54,0x64,0x3b,0x7b # CHECK: cvt.s.w $f3, $f4 + +0x54,0x64,0x5b,0x7b # CHECK: cvt.s.l $f3, $f4 Index: test/MC/Disassembler/Mips/micromips64r6.txt =================================================================== --- test/MC/Disassembler/Mips/micromips64r6.txt +++ test/MC/Disassembler/Mips/micromips64r6.txt @@ -21,3 +21,103 @@ 0x58 0x64 0x29 0x98 # CHECK: ddivu $3, $4, $5 0x58 0x64 0x29 0xd8 # CHECK: dmodu $3, $4, $5 + +0x54 0x64 0x28 0x0b # CHECK: max.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x0b # CHECK: max.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x2b # CHECK: maxa.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x2b # CHECK: maxa.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x03 # CHECK: min.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x03 # CHECK: min.d $f5, $f4, $f3 + +0x54 0x64 0x28 0x23 # CHECK: mina.s $f5, $f4, $f3 + +0x54 0x64 0x2a 0x23 # CHECK: mina.d $f5, $f4, $f3 + +0x54 0x83 0x10 0x05 # CHECK: cmp.af.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x45 # CHECK: cmp.un.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x85 # CHECK: cmp.eq.s $f2, $f3, $f4 + +0x54 0x83 0x10 0xc5 # CHECK: cmp.ueq.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x05 # CHECK: cmp.lt.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x45 # CHECK: cmp.ult.s $f2, $f3, $f4 + +0x54 0x83 0x11 0x85 # CHECK: cmp.le.s $f2, $f3, $f4 + +0x54 0x83 0x11 0xc5 # CHECK: cmp.ule.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x05 # CHECK: cmp.saf.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x45 # CHECK: cmp.sun.s $f2, $f3, $f4 + +0x54 0x83 0x12 0x85 # CHECK: cmp.seq.s $f2, $f3, $f4 + +0x54 0x83 0x12 0xc5 # CHECK: cmp.sueq.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x05 # CHECK: cmp.slt.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x45 # CHECK: cmp.sult.s $f2, $f3, $f4 + +0x54 0x83 0x13 0x85 # CHECK: cmp.sle.s $f2, $f3, $f4 + +0x54 0x83 0x13 0xc5 # CHECK: cmp.sule.s $f2, $f3, $f4 + +0x54 0x83 0x10 0x15 # CHECK: cmp.af.d $f2, $f3, $f4 + +0x54 0x83 0x10 0x55 # CHECK: cmp.un.d $f2, $f3, $f4 + +0x54 0x83 0x10 0x95 # CHECK: cmp.eq.d $f2, $f3, $f4 + +0x54 0x83 0x10 0xd5 # CHECK: cmp.ueq.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x15 # CHECK: cmp.lt.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x55 # CHECK: cmp.ult.d $f2, $f3, $f4 + +0x54 0x83 0x11 0x95 # CHECK: cmp.le.d $f2, $f3, $f4 + +0x54 0x83 0x11 0xd5 # CHECK: cmp.ule.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x15 # CHECK: cmp.saf.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x55 # CHECK: cmp.sun.d $f2, $f3, $f4 + +0x54 0x83 0x12 0x95 # CHECK: cmp.seq.d $f2, $f3, $f4 + +0x54 0x83 0x12 0xd5 # CHECK: cmp.sueq.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x15 # CHECK: cmp.slt.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x55 # CHECK: cmp.sult.d $f2, $f3, $f4 + +0x54 0x83 0x13 0x95 # CHECK: cmp.sle.d $f2, $f3, $f4 + +0x54 0x83 0x13 0xd5 # CHECK: cmp.sule.d $f2, $f3, $f4 + +0x54 0x64 0x01 0x3b # CHECK: cvt.l.s $f3, $f4 + +0x54 0x64 0x41 0x3b # CHECK: cvt.l.d $f3, $f4 + +0x54 0x64 0x09 0x3b # CHECK: cvt.w.s $f3, $f4 + +0x54 0x64 0x49 0x3b # CHECK: cvt.w.d $f3, $f4 + +0x54 0x44 0x13 0x7b # CHECK: cvt.d.s $f2, $f4 + +0x54 0x44 0x33 0x7b # CHECK: cvt.d.w $f2, $f4 + +0x54 0x44 0x53 0x7b # CHECK: cvt.d.l $f2, $f4 + +0x54,0x44,0x1b,0x7b # CHECK: cvt.s.d $f2, $f4 + +0x54,0x64,0x3b,0x7b # CHECK: cvt.s.w $f3, $f4 + +0x54,0x64,0x5b,0x7b # CHECK: cvt.s.l $f3, $f4 Index: test/MC/Mips/micromips32r6/valid.s =================================================================== --- test/MC/Mips/micromips32r6/valid.s +++ test/MC/Mips/micromips32r6/valid.s @@ -60,4 +60,54 @@ xori $3, $4, 1234 # CHECK: xori $3, $4, 1234 # encoding: [0x70,0x64,0x04,0xd2] sw $5, 4($6) # CHECK: sw $5, 4($6) # encoding: [0xf8,0xa6,0x00,0x04] swe $5, 8($4) # CHECK: swe $5, 8($4) # encoding: [0x60,0xa4,0xae,0x08] + max.s $f5, $f4, $f3 # CHECK: max.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x0b] + max.d $f5, $f4, $f3 # CHECK: max.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x0b] + maxa.s $f5, $f4, $f3 # CHECK: maxa.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x2b] + maxa.d $f5, $f4, $f3 # CHECK: maxa.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x2b] + min.s $f5, $f4, $f3 # CHECK: min.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x03] + min.d $f5, $f4, $f3 # CHECK: min.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x03] + mina.s $f5, $f4, $f3 # CHECK: mina.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x23] + mina.d $f5, $f4, $f3 # CHECK: mina.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x23] + cmp.af.s $f2, $f3, $f4 # CHECK: cmp.af.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x05] + cmp.af.d $f2, $f3, $f4 # CHECK: cmp.af.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x15] + cmp.un.s $f2, $f3, $f4 # CHECK: cmp.un.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x45] + cmp.un.d $f2, $f3, $f4 # CHECK: cmp.un.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x55] + cmp.eq.s $f2, $f3, $f4 # CHECK: cmp.eq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x85] + cmp.eq.d $f2, $f3, $f4 # CHECK: cmp.eq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x95] + cmp.ueq.s $f2, $f3, $f4 # CHECK: cmp.ueq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0xc5] + cmp.ueq.d $f2, $f3, $f4 # CHECK: cmp.ueq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0xd5] + cmp.lt.s $f2, $f3, $f4 # CHECK: cmp.lt.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x05] + cmp.lt.d $f2, $f3, $f4 # CHECK: cmp.lt.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x15] + cmp.ult.s $f2, $f3, $f4 # CHECK: cmp.ult.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x45] + cmp.ult.d $f2, $f3, $f4 # CHECK: cmp.ult.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x55] + cmp.le.s $f2, $f3, $f4 # CHECK: cmp.le.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x85] + cmp.le.d $f2, $f3, $f4 # CHECK: cmp.le.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x95] + cmp.ule.s $f2, $f3, $f4 # CHECK: cmp.ule.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0xc5] + cmp.ule.d $f2, $f3, $f4 # CHECK: cmp.ule.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0xd5] + cmp.saf.s $f2, $f3, $f4 # CHECK: cmp.saf.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x05] + cmp.saf.d $f2, $f3, $f4 # CHECK: cmp.saf.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x15] + cmp.sun.s $f2, $f3, $f4 # CHECK: cmp.sun.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x45] + cmp.sun.d $f2, $f3, $f4 # CHECK: cmp.sun.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x55] + cmp.seq.s $f2, $f3, $f4 # CHECK: cmp.seq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x85] + cmp.seq.d $f2, $f3, $f4 # CHECK: cmp.seq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x95] + cmp.sueq.s $f2, $f3, $f4 # CHECK: cmp.sueq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0xc5] + cmp.sueq.d $f2, $f3, $f4 # CHECK: cmp.sueq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0xd5] + cmp.slt.s $f2, $f3, $f4 # CHECK: cmp.slt.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x05] + cmp.slt.d $f2, $f3, $f4 # CHECK: cmp.slt.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x15] + cmp.sult.s $f2, $f3, $f4 # CHECK: cmp.sult.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x45] + cmp.sult.d $f2, $f3, $f4 # CHECK: cmp.sult.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x55] + cmp.sle.s $f2, $f3, $f4 # CHECK: cmp.sle.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x85] + cmp.sle.d $f2, $f3, $f4 # CHECK: cmp.sle.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x95] + cmp.sule.s $f2, $f3, $f4 # CHECK: cmp.sule.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0xc5] + cmp.sule.d $f2, $f3, $f4 # CHECK: cmp.sule.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0xd5] + cvt.l.s $f3, $f4 # CHECK: cvt.l.s $f3, $f4 # encoding: [0x54,0x64,0x01,0x3b] + cvt.l.d $f3, $f4 # CHECK: cvt.l.d $f3, $f4 # encoding: [0x54,0x64,0x41,0x3b] + cvt.w.s $f3, $f4 # CHECK: cvt.w.s $f3, $f4 # encoding: [0x54,0x64,0x09,0x3b] + cvt.w.d $f3, $f4 # CHECK: cvt.w.d $f3, $f4 # encoding: [0x54,0x64,0x49,0x3b] + cvt.d.s $f2, $f4 # CHECK: cvt.d.s $f2, $f4 # encoding: [0x54,0x44,0x13,0x7b] + cvt.d.w $f2, $f4 # CHECK: cvt.d.w $f2, $f4 # encoding: [0x54,0x44,0x33,0x7b] + cvt.d.l $f2, $f4 # CHECK: cvt.d.l $f2, $f4 # encoding: [0x54,0x44,0x53,0x7b] + cvt.s.d $f2, $f4 # CHECK: cvt.s.d $f2, $f4 # encoding: [0x54,0x44,0x1b,0x7b] + cvt.s.w $f3, $f4 # CHECK: cvt.s.w $f3, $f4 # encoding: [0x54,0x64,0x3b,0x7b] + cvt.s.l $f3, $f4 # CHECK: cvt.s.l $f3, $f4 # encoding: [0x54,0x64,0x5b,0x7b] Index: test/MC/Mips/micromips64r6/valid.s =================================================================== --- test/MC/Mips/micromips64r6/valid.s +++ test/MC/Mips/micromips64r6/valid.s @@ -12,5 +12,55 @@ dmod $3, $4, $5 # CHECK: dmod $3, $4, $5 # encoding: [0x58,0x64,0x29,0x58] ddivu $3, $4, $5 # CHECK: ddivu $3, $4, $5 # encoding: [0x58,0x64,0x29,0x98] dmodu $3, $4, $5 # CHECK: dmodu $3, $4, $5 # encoding: [0x58,0x64,0x29,0xd8] + max.s $f5, $f4, $f3 # CHECK: max.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x0b] + max.d $f5, $f4, $f3 # CHECK: max.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x0b] + maxa.s $f5, $f4, $f3 # CHECK: maxa.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x2b] + maxa.d $f5, $f4, $f3 # CHECK: maxa.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x2b] + min.s $f5, $f4, $f3 # CHECK: min.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x03] + min.d $f5, $f4, $f3 # CHECK: min.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x03] + mina.s $f5, $f4, $f3 # CHECK: mina.s $f5, $f4, $f3 # encoding: [0x54,0x64,0x28,0x23] + mina.d $f5, $f4, $f3 # CHECK: mina.d $f5, $f4, $f3 # encoding: [0x54,0x64,0x2a,0x23] + cmp.af.s $f2, $f3, $f4 # CHECK: cmp.af.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x05] + cmp.af.d $f2, $f3, $f4 # CHECK: cmp.af.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x15] + cmp.un.s $f2, $f3, $f4 # CHECK: cmp.un.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x45] + cmp.un.d $f2, $f3, $f4 # CHECK: cmp.un.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x55] + cmp.eq.s $f2, $f3, $f4 # CHECK: cmp.eq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x85] + cmp.eq.d $f2, $f3, $f4 # CHECK: cmp.eq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0x95] + cmp.ueq.s $f2, $f3, $f4 # CHECK: cmp.ueq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0xc5] + cmp.ueq.d $f2, $f3, $f4 # CHECK: cmp.ueq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x10,0xd5] + cmp.lt.s $f2, $f3, $f4 # CHECK: cmp.lt.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x05] + cmp.lt.d $f2, $f3, $f4 # CHECK: cmp.lt.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x15] + cmp.ult.s $f2, $f3, $f4 # CHECK: cmp.ult.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x45] + cmp.ult.d $f2, $f3, $f4 # CHECK: cmp.ult.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x55] + cmp.le.s $f2, $f3, $f4 # CHECK: cmp.le.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x85] + cmp.le.d $f2, $f3, $f4 # CHECK: cmp.le.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0x95] + cmp.ule.s $f2, $f3, $f4 # CHECK: cmp.ule.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0xc5] + cmp.ule.d $f2, $f3, $f4 # CHECK: cmp.ule.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x11,0xd5] + cmp.saf.s $f2, $f3, $f4 # CHECK: cmp.saf.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x05] + cmp.saf.d $f2, $f3, $f4 # CHECK: cmp.saf.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x15] + cmp.sun.s $f2, $f3, $f4 # CHECK: cmp.sun.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x45] + cmp.sun.d $f2, $f3, $f4 # CHECK: cmp.sun.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x55] + cmp.seq.s $f2, $f3, $f4 # CHECK: cmp.seq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x85] + cmp.seq.d $f2, $f3, $f4 # CHECK: cmp.seq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0x95] + cmp.sueq.s $f2, $f3, $f4 # CHECK: cmp.sueq.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0xc5] + cmp.sueq.d $f2, $f3, $f4 # CHECK: cmp.sueq.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x12,0xd5] + cmp.slt.s $f2, $f3, $f4 # CHECK: cmp.slt.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x05] + cmp.slt.d $f2, $f3, $f4 # CHECK: cmp.slt.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x15] + cmp.sult.s $f2, $f3, $f4 # CHECK: cmp.sult.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x45] + cmp.sult.d $f2, $f3, $f4 # CHECK: cmp.sult.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x55] + cmp.sle.s $f2, $f3, $f4 # CHECK: cmp.sle.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x85] + cmp.sle.d $f2, $f3, $f4 # CHECK: cmp.sle.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0x95] + cmp.sule.s $f2, $f3, $f4 # CHECK: cmp.sule.s $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0xc5] + cmp.sule.d $f2, $f3, $f4 # CHECK: cmp.sule.d $f2, $f3, $f4 # encoding: [0x54,0x83,0x13,0xd5] + cvt.l.s $f3, $f4 # CHECK: cvt.l.s $f3, $f4 # encoding: [0x54,0x64,0x01,0x3b] + cvt.l.d $f3, $f4 # CHECK: cvt.l.d $f3, $f4 # encoding: [0x54,0x64,0x41,0x3b] + cvt.w.s $f3, $f4 # CHECK: cvt.w.s $f3, $f4 # encoding: [0x54,0x64,0x09,0x3b] + cvt.w.d $f3, $f4 # CHECK: cvt.w.d $f3, $f4 # encoding: [0x54,0x64,0x49,0x3b] + cvt.d.s $f2, $f4 # CHECK: cvt.d.s $f2, $f4 # encoding: [0x54,0x44,0x13,0x7b] + cvt.d.w $f2, $f4 # CHECK: cvt.d.w $f2, $f4 # encoding: [0x54,0x44,0x33,0x7b] + cvt.d.l $f2, $f4 # CHECK: cvt.d.l $f2, $f4 # encoding: [0x54,0x44,0x53,0x7b] + cvt.s.d $f2, $f4 # CHECK: cvt.s.d $f2, $f4 # encoding: [0x54,0x44,0x1b,0x7b] + cvt.s.w $f3, $f4 # CHECK: cvt.s.w $f3, $f4 # encoding: [0x54,0x64,0x3b,0x7b] + cvt.s.l $f3, $f4 # CHECK: cvt.s.l $f3, $f4 # encoding: [0x54,0x64,0x5b,0x7b] 1: