Index: lib/Target/Mips/MicroMipsInstrFPU.td =================================================================== --- lib/Target/Mips/MicroMipsInstrFPU.td +++ lib/Target/Mips/MicroMipsInstrFPU.td @@ -95,7 +95,7 @@ ABS_FM_MM<1, 0x2d>; def FMOV_D32_MM : MMRel, ABSS_FT<"mov.d", AFGR64Opnd, AFGR64Opnd, II_MOV_D>, - ABS_FM_MM<1, 0x1>, AdditionalRequires<[NotFP64bit]>; + ABS_FM_MM<1, 0x1>, FGR_32; def MOVZ_I_S_MM : MMRel, CMov_I_F_FT<"movz.s", GPR32Opnd, FGR32Opnd, II_MOVZ_S>, CMov_I_F_FM_MM<0x78, 0>; @@ -124,9 +124,9 @@ def MTC1_MM : MMRel, MTC1_FT<"mtc1", FGR32Opnd, GPR32Opnd, II_MTC1, bitconvert>, MFC1_FM_MM<0xa0>; def MFHC1_MM : MMRel, MFC1_FT<"mfhc1", GPR32Opnd, AFGR64Opnd, II_MFHC1>, - MFC1_FM_MM<0xc0>, ISA_MIPS32R2, AdditionalRequires<[NotFP64bit]>; + MFC1_FM_MM<0xc0>, ISA_MIPS32R2, FGR_32; def MTHC1_MM : MMRel, MTC1_64_FT<"mthc1", AFGR64Opnd, GPR32Opnd, II_MTHC1>, - MFC1_FM_MM<0xe0>, ISA_MIPS32R2, AdditionalRequires<[NotFP64bit]>; + MFC1_FM_MM<0xe0>, ISA_MIPS32R2, FGR_32; def MADD_S_MM : MMRel, MADDS_FT<"madd.s", FGR32Opnd, II_MADD_S, fadd>, MADDS_FM_MM<0x1>; Index: lib/Target/Mips/MipsInstrFPU.td =================================================================== --- lib/Target/Mips/MipsInstrFPU.td +++ lib/Target/Mips/MipsInstrFPU.td @@ -112,11 +112,8 @@ multiclass ADDS_M { - def _D32 : MMRel, ADDS_FT, - AdditionalRequires<[NotFP64bit]>; - def _D64 : ADDS_FT, - AdditionalRequires<[IsFP64bit]> { + def _D32 : MMRel, ADDS_FT, FGR_32; + def _D64 : ADDS_FT, FGR_64 { string DecoderNamespace = "Mips64"; } } @@ -131,18 +128,15 @@ multiclass ABSS_M { def _D32 : MMRel, ABSS_FT, - AdditionalRequires<[NotFP64bit]>; - def _D64 : ABSS_FT, - AdditionalRequires<[IsFP64bit]> { + FGR_32; + def _D64 : ABSS_FT, FGR_64 { string DecoderNamespace = "Mips64"; } } multiclass ROUND_M { - def _D32 : MMRel, ABSS_FT, - AdditionalRequires<[NotFP64bit]>; - def _D64 : ABSS_FT, - AdditionalRequires<[IsFP64bit]> { + def _D32 : MMRel, ABSS_FT, FGR_32; + def _D64 : ABSS_FT, FGR_64 { let DecoderNamespace = "Mips64"; } } @@ -265,10 +259,10 @@ defm S : C_COND_M<"s", FGR32Opnd, 16, II_C_CC_S>, ISA_MIPS1_NOT_32R6_64R6; defm D32 : C_COND_M<"d", AFGR64Opnd, 17, II_C_CC_D>, ISA_MIPS1_NOT_32R6_64R6, - AdditionalRequires<[NotFP64bit]>; + FGR_32; let DecoderNamespace = "Mips64" in defm D64 : C_COND_M<"d", FGR64Opnd, 17, II_C_CC_D>, ISA_MIPS1_NOT_32R6_64R6, - AdditionalRequires<[IsFP64bit]>; + FGR_64; //===----------------------------------------------------------------------===// // Floating Point Instructions @@ -368,15 +362,15 @@ def MTC1 : MMRel, MTC1_FT<"mtc1", FGR32Opnd, GPR32Opnd, II_MTC1, bitconvert>, MFC1_FM<4>; def MFHC1_D32 : MMRel, MFC1_FT<"mfhc1", GPR32Opnd, AFGR64Opnd, II_MFHC1>, - MFC1_FM<3>, ISA_MIPS32R2, AdditionalRequires<[NotFP64bit]>; + MFC1_FM<3>, ISA_MIPS32R2, FGR_32; def MFHC1_D64 : MFC1_FT<"mfhc1", GPR32Opnd, FGR64Opnd, II_MFHC1>, - MFC1_FM<3>, ISA_MIPS32R2, AdditionalRequires<[IsFP64bit]> { + MFC1_FM<3>, ISA_MIPS32R2, FGR_64 { let DecoderNamespace = "Mips64"; } def MTHC1_D32 : MMRel, MTC1_64_FT<"mthc1", AFGR64Opnd, GPR32Opnd, II_MTHC1>, - MFC1_FM<7>, ISA_MIPS32R2, AdditionalRequires<[NotFP64bit]>; + MFC1_FM<7>, ISA_MIPS32R2, FGR_32; def MTHC1_D64 : MTC1_64_FT<"mthc1", FGR64Opnd, GPR32Opnd, II_MTHC1>, - MFC1_FM<7>, ISA_MIPS32R2, AdditionalRequires<[IsFP64bit]> { + MFC1_FM<7>, ISA_MIPS32R2, FGR_64 { let DecoderNamespace = "Mips64"; } def DMFC1 : MFC1_FT<"dmfc1", GPR64Opnd, FGR64Opnd, II_DMFC1, @@ -387,9 +381,9 @@ def FMOV_S : MMRel, ABSS_FT<"mov.s", FGR32Opnd, FGR32Opnd, II_MOV_S>, ABSS_FM<0x6, 16>; def FMOV_D32 : MMRel, ABSS_FT<"mov.d", AFGR64Opnd, AFGR64Opnd, II_MOV_D>, - ABSS_FM<0x6, 17>, AdditionalRequires<[NotFP64bit]>; + ABSS_FM<0x6, 17>, FGR_32; def FMOV_D64 : ABSS_FT<"mov.d", FGR64Opnd, FGR64Opnd, II_MOV_D>, - ABSS_FM<0x6, 17>, AdditionalRequires<[IsFP64bit]> { + ABSS_FM<0x6, 17>, FGR_64 { let DecoderNamespace = "Mips64"; } @@ -522,10 +516,10 @@ def FCMP_S32 : MMRel, CEQS_FT<"s", FGR32, II_C_CC_S, MipsFPCmp>, CEQS_FM<16>, ISA_MIPS1_NOT_32R6_64R6; def FCMP_D32 : MMRel, CEQS_FT<"d", AFGR64, II_C_CC_D, MipsFPCmp>, CEQS_FM<17>, - ISA_MIPS1_NOT_32R6_64R6, AdditionalRequires<[NotFP64bit]>; + ISA_MIPS1_NOT_32R6_64R6, FGR_32; let DecoderNamespace = "Mips64" in def FCMP_D64 : CEQS_FT<"d", FGR64, II_C_CC_D, MipsFPCmp>, CEQS_FM<17>, - ISA_MIPS1_NOT_32R6_64R6, AdditionalRequires<[IsFP64bit]>; + ISA_MIPS1_NOT_32R6_64R6, FGR_64; //===----------------------------------------------------------------------===// // Floating Point Pseudo-Instructions @@ -537,10 +531,8 @@ PseudoSE<(outs RO:$dst), (ins GPR32Opnd:$lo, GPR32Opnd:$hi), [(set RO:$dst, (MipsBuildPairF64 GPR32Opnd:$lo, GPR32Opnd:$hi))]>; -def BuildPairF64 : BuildPairF64Base, - AdditionalRequires<[NotFP64bit]>, HARDFLOAT; -def BuildPairF64_64 : BuildPairF64Base, - AdditionalRequires<[IsFP64bit]>, HARDFLOAT; +def BuildPairF64 : BuildPairF64Base, FGR_32, HARDFLOAT; +def BuildPairF64_64 : BuildPairF64Base, FGR_64, HARDFLOAT; // This pseudo instr gets expanded into 2 mfc1 instrs after register // allocation. @@ -550,10 +542,8 @@ PseudoSE<(outs GPR32Opnd:$dst), (ins RO:$src, i32imm:$n), [(set GPR32Opnd:$dst, (MipsExtractElementF64 RO:$src, imm:$n))]>; -def ExtractElementF64 : ExtractElementF64Base, - AdditionalRequires<[NotFP64bit]>, HARDFLOAT; -def ExtractElementF64_64 : ExtractElementF64Base, - AdditionalRequires<[IsFP64bit]>, HARDFLOAT; +def ExtractElementF64 : ExtractElementF64Base, FGR_32, HARDFLOAT; +def ExtractElementF64_64 : ExtractElementF64Base, FGR_64, HARDFLOAT; //===----------------------------------------------------------------------===// // InstAliases.