Index: llvm/trunk/lib/Target/Mips/MicroMips32r6InstrFormats.td =================================================================== --- llvm/trunk/lib/Target/Mips/MicroMips32r6InstrFormats.td +++ llvm/trunk/lib/Target/Mips/MicroMips32r6InstrFormats.td @@ -20,7 +20,8 @@ // Class used for microMIPS32r6 instructions. class MicroMipsR6Inst16 : PredicateControl { string DecoderNamespace = "MicroMipsR6"; - let InsnPredicates = [HasMicroMips32r6]; + let InsnPredicates = [HasMips32r6]; + let EncodingPredicates = [InMicroMips]; } //===----------------------------------------------------------------------===// Index: llvm/trunk/lib/Target/Mips/MipsInstrInfo.td =================================================================== --- llvm/trunk/lib/Target/Mips/MipsInstrInfo.td +++ llvm/trunk/lib/Target/Mips/MipsInstrInfo.td @@ -206,8 +206,6 @@ AssemblerPredicate<"FeatureMips64r6">; def NotMips64r6 : Predicate<"!Subtarget->hasMips64r6()">, AssemblerPredicate<"!FeatureMips64r6">; -def HasMicroMips32r6 : Predicate<"Subtarget->inMicroMips32r6Mode()">, - AssemblerPredicate<"FeatureMicroMips,FeatureMips32r6">; def InMips16Mode : Predicate<"Subtarget->inMips16Mode()">, AssemblerPredicate<"FeatureMips16">; def NotInMips16Mode : Predicate<"!Subtarget->inMips16Mode()">, @@ -277,88 +275,147 @@ // subtractive predicate will hopefully keep us under the 32 predicate // limit long enough to develop an alternative way to handle P1||P2 // predicates. +class ISA_MIPS1 { + list EncodingPredicates = [HasStdEnc]; +} class ISA_MIPS1_NOT_MIPS3 { list InsnPredicates = [NotMips3]; + list EncodingPredicates = [HasStdEnc]; } class ISA_MIPS1_NOT_4_32 { list InsnPredicates = [NotMips4_32]; + list EncodingPredicates = [HasStdEnc]; } class ISA_MIPS1_NOT_32R6_64R6 { list InsnPredicates = [NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS2 { + list InsnPredicates = [HasMips2]; + list EncodingPredicates = [HasStdEnc]; } -class ISA_MIPS2 { list InsnPredicates = [HasMips2]; } class ISA_MIPS2_NOT_32R6_64R6 { list InsnPredicates = [HasMips2, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS3 { + list InsnPredicates = [HasMips3]; + list EncodingPredicates = [HasStdEnc]; } -class ISA_MIPS3 { list InsnPredicates = [HasMips3]; } class ISA_MIPS3_NOT_32R6_64R6 { list InsnPredicates = [HasMips3, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS32 { + list InsnPredicates = [HasMips32]; + list EncodingPredicates = [HasStdEnc]; } -class ISA_MIPS32 { list InsnPredicates = [HasMips32]; } class ISA_MIPS32_NOT_32R6_64R6 { list InsnPredicates = [HasMips32, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS32R2 { + list InsnPredicates = [HasMips32r2]; + list EncodingPredicates = [HasStdEnc]; } -class ISA_MIPS32R2 { list InsnPredicates = [HasMips32r2]; } class ISA_MIPS32R2_NOT_32R6_64R6 { list InsnPredicates = [HasMips32r2, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS32R5 { + list InsnPredicates = [HasMips32r5]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS64 { + list InsnPredicates = [HasMips64]; + list EncodingPredicates = [HasStdEnc]; } -class ISA_MIPS32R5 { list InsnPredicates = [HasMips32r5]; } -class ISA_MIPS64 { list InsnPredicates = [HasMips64]; } class ISA_MIPS64_NOT_64R6 { list InsnPredicates = [HasMips64, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS64R2 { + list InsnPredicates = [HasMips64r2]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS32R6 { + list InsnPredicates = [HasMips32r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MIPS64R6 { + list InsnPredicates = [HasMips64r6]; + list EncodingPredicates = [HasStdEnc]; +} +class ISA_MICROMIPS { + list EncodingPredicates = [InMicroMips]; } -class ISA_MIPS64R2 { list InsnPredicates = [HasMips64r2]; } -class ISA_MIPS32R6 { list InsnPredicates = [HasMips32r6]; } -class ISA_MIPS64R6 { list InsnPredicates = [HasMips64r6]; } -class ISA_MICROMIPS { list InsnPredicates = [InMicroMips]; } class ISA_MICROMIPS32R6 { - list InsnPredicates = [HasMicroMips32r6]; + list InsnPredicates = [HasMips32r6]; + list EncodingPredicates = [InMicroMips]; +} +class ISA_MICROMIPS64R6 { + list InsnPredicates = [HasMips64r6]; + list EncodingPredicates = [InMicroMips]; } class ISA_MICROMIPS32_NOT_MIPS32R6 { - list InsnPredicates = [InMicroMips, NotMips32r6]; + list InsnPredicates = [NotMips32r6]; + list EncodingPredicates = [InMicroMips]; } - class INSN_EVA { list InsnPredicates = [HasEVA]; } class INSN_EVA_NOT_32R6_64R6 { list InsnPredicates = [NotMips32r6, NotMips64r6, HasEVA]; } // The portions of MIPS-III that were also added to MIPS32 -class INSN_MIPS3_32 { list InsnPredicates = [HasMips3_32]; } +class INSN_MIPS3_32 { + list InsnPredicates = [HasMips3_32]; + list EncodingPredicates = [HasStdEnc]; +} // The portions of MIPS-III that were also added to MIPS32 but were removed in // MIPS32r6 and MIPS64r6. class INSN_MIPS3_32_NOT_32R6_64R6 { list InsnPredicates = [HasMips3_32, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; } // The portions of MIPS-III that were also added to MIPS32 -class INSN_MIPS3_32R2 { list InsnPredicates = [HasMips3_32r2]; } +class INSN_MIPS3_32R2 { + list InsnPredicates = [HasMips3_32r2]; + list EncodingPredicates = [HasStdEnc]; +} // The portions of MIPS-IV that were also added to MIPS32. -class INSN_MIPS4_32 { list InsnPredicates = [HasMips4_32]; } +class INSN_MIPS4_32 { + list InsnPredicates = [HasMips4_32]; + list EncodingPredicates = [HasStdEnc]; +} // The portions of MIPS-IV that were also added to MIPS32 but were removed in // MIPS32r6 and MIPS64r6. class INSN_MIPS4_32_NOT_32R6_64R6 { list InsnPredicates = [HasMips4_32, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; } // The portions of MIPS-IV that were also added to MIPS32r2 but were removed in // MIPS32r6 and MIPS64r6. class INSN_MIPS4_32R2_NOT_32R6_64R6 { list InsnPredicates = [HasMips4_32r2, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; } // The portions of MIPS-IV that were also added to MIPS32r2. class INSN_MIPS4_32R2 { list InsnPredicates = [HasMips4_32r2]; + list EncodingPredicates = [HasStdEnc]; } // The portions of MIPS-V that were also added to MIPS32r2 but were removed in // MIPS32r6 and MIPS64r6. class INSN_MIPS5_32R2_NOT_32R6_64R6 { list InsnPredicates = [HasMips5_32r2, NotMips32r6, NotMips64r6]; + list EncodingPredicates = [HasStdEnc]; } class ASE_CNMIPS { @@ -392,7 +449,8 @@ // Class used for separating microMIPSr6 and microMIPS (r3) instruction. // It can be used only on instructions that doesn't inherit PredicateControl. class ISA_MICROMIPS_NOT_32R6 : PredicateControl { - let InsnPredicates = [InMicroMips, NotMips32r6]; + let InsnPredicates = [NotMips32r6]; + let EncodingPredicates = [InMicroMips]; } class ASE_NOT_DSP { Index: llvm/trunk/lib/Target/Mips/MipsScheduleP5600.td =================================================================== --- llvm/trunk/lib/Target/Mips/MipsScheduleP5600.td +++ llvm/trunk/lib/Target/Mips/MipsScheduleP5600.td @@ -18,8 +18,7 @@ list UnsupportedFeatures = [HasMips32r6, HasMips64r6, HasMips64, HasMips64r2, HasCnMips, InMicroMips, InMips16Mode, - HasMicroMips32r6, HasDSP, - HasDSPR2, HasMT]; + HasDSP, HasDSPR2, HasMT]; }