85def FeatureMips1 : SubtargetFeature<"mips1", "MipsArchVersion", "Mips1", 86 "Mips I ISA Support [highly experimental]">; 87def FeatureMips2 : SubtargetFeature<"mips2", "MipsArchVersion", "Mips2", 88 "Mips II ISA Support [highly experimental]", 89 [FeatureMips1]>; 90def FeatureMips3_32 : SubtargetFeature<"mips3_32", "HasMips3_32", "true", 91 "Subset of MIPS-III that is also in MIPS32 " 92 "[highly experimental]">; 93def FeatureMips3_32r2 : SubtargetFeature<"mips3_32r2", "HasMips3_32r2", "true", 94 "Subset of MIPS-III that is also in MIPS32r2 " 95 "[highly experimental]">; 96def FeatureMips3 : SubtargetFeature<"mips3", "MipsArchVersion", "Mips3", 97 "MIPS III ISA Support [highly experimental]", 98 [FeatureMips2, FeatureMips3_32, 99 FeatureMips3_32r2, FeatureGP64Bit, 100 FeatureFP64Bit]>; 101def FeatureMips4_32 : SubtargetFeature<"mips4_32", "HasMips4_32", "true", 102 "Subset of MIPS-IV that is also in MIPS32 " 103 "[highly experimental]">; 104def FeatureMips4_32r2 : SubtargetFeature<"mips4_32r2", "HasMips4_32r2", "true", 105 "Subset of MIPS-IV that is also in MIPS32r2 " 106 "[highly experimental]">; 107def FeatureMips4 : SubtargetFeature<"mips4", "MipsArchVersion", 108 "Mips4", "MIPS IV ISA Support", 109 [FeatureMips3, FeatureMips4_32, 110 FeatureMips4_32r2]>; 111def FeatureMips5_32r2 : SubtargetFeature<"mips5_32r2", "HasMips5_32r2", "true", 112 "Subset of MIPS-V that is also in MIPS32r2 " 113 "[highly experimental]">; 114def FeatureMips5 : SubtargetFeature<"mips5", "MipsArchVersion", "Mips5", 115 "MIPS V ISA Support [highly experimental]", 116 [FeatureMips4, FeatureMips5_32r2]>; 117def FeatureMips32 : SubtargetFeature<"mips32", "MipsArchVersion", "Mips32", 118 "Mips32 ISA Support", 119 [FeatureMips2, FeatureMips3_32, 120 FeatureMips4_32]>; 121def FeatureMips32r2 : SubtargetFeature<"mips32r2", "MipsArchVersion", 122 "Mips32r2", "Mips32r2 ISA Support", 123 [FeatureMips3_32r2, FeatureMips4_32r2, 124 FeatureMips5_32r2, FeatureMips32]>; 125def FeatureMips32r6 : SubtargetFeature<"mips32r6", "MipsArchVersion", 126 "Mips32r6", 127 "Mips32r6 ISA Support [experimental]", 128 [FeatureMips32r2, FeatureFP64Bit, 129 FeatureNaN2008]>; 130def FeatureMips64 : SubtargetFeature<"mips64", "MipsArchVersion", 131 "Mips64", "Mips64 ISA Support", 132 [FeatureMips5, FeatureMips32]>; 133def FeatureMips64r2 : SubtargetFeature<"mips64r2", "MipsArchVersion", 134 "Mips64r2", "Mips64r2 ISA Support", 135 [FeatureMips64, FeatureMips32r2]>; 136def FeatureMips64r6 : SubtargetFeature<"mips64r6", "MipsArchVersion", 137 "Mips64r6", 138 "Mips64r6 ISA Support [experimental]", 139 [FeatureMips32r6, FeatureMips64r2, 140 FeatureNaN2008]>; 141 142def FeatureMips16 : SubtargetFeature<"mips16", "InMips16Mode", "true", 143 "Mips16 mode">; 144 145def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", "Mips DSP ASE">; 146def FeatureDSPR2 : SubtargetFeature<"dspr2", "HasDSPR2", "true", 147 "Mips DSP-R2 ASE", [FeatureDSP]>; 148 149def FeatureMSA : SubtargetFeature<"msa", "HasMSA", "true", "Mips MSA ASE">; 150 151def FeatureMicroMips : SubtargetFeature<"micromips", "InMicroMipsMode", "true", 152 "microMips mode">; 153 154def FeatureCnMips : SubtargetFeature<"cnmips", "HasCnMips", 155 "true", "Octeon cnMIPS Support", 156 [FeatureMips64r2]>; 157 158//===----------------------------------------------------------------------===// 159// Mips processors supported. 160//===----------------------------------------------------------------------===// 161 162class Proc<string Name, list<SubtargetFeature> Features> 163 : Processor<Name, MipsGenericItineraries, Features>; 164 165def : Proc<"mips1", [FeatureMips1, FeatureO32]>; 166def : Proc<"mips2", [FeatureMips2, FeatureO32]>; 167def : Proc<"mips32", [FeatureMips32, FeatureO32]>; 168def : Proc<"mips32r2", [FeatureMips32r2, FeatureO32]>; 169def : Proc<"mips32r6", [FeatureMips32r6, FeatureO32]>; 170 171def : Proc<"mips3", [FeatureMips3, FeatureN64]>; 172def : Proc<"mips4", [FeatureMips4, FeatureN64]>; 173def : Proc<"mips5", [FeatureMips5, FeatureN64]>; 174def : Proc<"mips64", [FeatureMips64, FeatureN64]>; 175def : Proc<"mips64r2", [FeatureMips64r2, FeatureN64]>; 176def : Proc<"mips64r6", [FeatureMips64r6, FeatureN64]>; 177def : Proc<"mips16", [FeatureMips16, FeatureO32]>; 178def : Proc<"octeon", [FeatureMips64r2, FeatureN64, FeatureCnMips]>; 179 180def MipsAsmParser : AsmParser { 181 let ShouldEmitMatchRegisterName = 0; 182 let MnemonicContainsDot = 1; 183} 184 185def MipsAsmParserVariant : AsmParserVariant { 186 int Variant = 0; 187 188 // Recognize hard coded registers. 189 string RegisterPrefix = "$"; 190} 191 192def Mips : Target { 193 let InstructionSet = MipsInstrInfo; 194 let AssemblyParsers = [MipsAsmParser]; 195 let AssemblyParserVariants = [MipsAsmParserVariant]; 196}
| 85def FeatureMips1 : SubtargetFeature<"mips1", "MipsArchVersion", "Mips1", 86 "Mips I ISA Support [highly experimental]">; 87def FeatureMips2 : SubtargetFeature<"mips2", "MipsArchVersion", "Mips2", 88 "Mips II ISA Support [highly experimental]", 89 [FeatureMips1]>; 90def FeatureMips3_32 : SubtargetFeature<"mips3_32", "HasMips3_32", "true", 91 "Subset of MIPS-III that is also in MIPS32 " 92 "[highly experimental]">; 93def FeatureMips3_32r2 : SubtargetFeature<"mips3_32r2", "HasMips3_32r2", "true", 94 "Subset of MIPS-III that is also in MIPS32r2 " 95 "[highly experimental]">; 96def FeatureMips3 : SubtargetFeature<"mips3", "MipsArchVersion", "Mips3", 97 "MIPS III ISA Support [highly experimental]", 98 [FeatureMips2, FeatureMips3_32, 99 FeatureMips3_32r2, FeatureGP64Bit, 100 FeatureFP64Bit]>; 101def FeatureMips4_32 : SubtargetFeature<"mips4_32", "HasMips4_32", "true", 102 "Subset of MIPS-IV that is also in MIPS32 " 103 "[highly experimental]">; 104def FeatureMips4_32r2 : SubtargetFeature<"mips4_32r2", "HasMips4_32r2", "true", 105 "Subset of MIPS-IV that is also in MIPS32r2 " 106 "[highly experimental]">; 107def FeatureMips4 : SubtargetFeature<"mips4", "MipsArchVersion", 108 "Mips4", "MIPS IV ISA Support", 109 [FeatureMips3, FeatureMips4_32, 110 FeatureMips4_32r2]>; 111def FeatureMips5_32r2 : SubtargetFeature<"mips5_32r2", "HasMips5_32r2", "true", 112 "Subset of MIPS-V that is also in MIPS32r2 " 113 "[highly experimental]">; 114def FeatureMips5 : SubtargetFeature<"mips5", "MipsArchVersion", "Mips5", 115 "MIPS V ISA Support [highly experimental]", 116 [FeatureMips4, FeatureMips5_32r2]>; 117def FeatureMips32 : SubtargetFeature<"mips32", "MipsArchVersion", "Mips32", 118 "Mips32 ISA Support", 119 [FeatureMips2, FeatureMips3_32, 120 FeatureMips4_32]>; 121def FeatureMips32r2 : SubtargetFeature<"mips32r2", "MipsArchVersion", 122 "Mips32r2", "Mips32r2 ISA Support", 123 [FeatureMips3_32r2, FeatureMips4_32r2, 124 FeatureMips5_32r2, FeatureMips32]>; 125def FeatureMips32r6 : SubtargetFeature<"mips32r6", "MipsArchVersion", 126 "Mips32r6", 127 "Mips32r6 ISA Support [experimental]", 128 [FeatureMips32r2, FeatureFP64Bit, 129 FeatureNaN2008]>; 130def FeatureMips64 : SubtargetFeature<"mips64", "MipsArchVersion", 131 "Mips64", "Mips64 ISA Support", 132 [FeatureMips5, FeatureMips32]>; 133def FeatureMips64r2 : SubtargetFeature<"mips64r2", "MipsArchVersion", 134 "Mips64r2", "Mips64r2 ISA Support", 135 [FeatureMips64, FeatureMips32r2]>; 136def FeatureMips64r6 : SubtargetFeature<"mips64r6", "MipsArchVersion", 137 "Mips64r6", 138 "Mips64r6 ISA Support [experimental]", 139 [FeatureMips32r6, FeatureMips64r2, 140 FeatureNaN2008]>; 141 142def FeatureMips16 : SubtargetFeature<"mips16", "InMips16Mode", "true", 143 "Mips16 mode">; 144 145def FeatureDSP : SubtargetFeature<"dsp", "HasDSP", "true", "Mips DSP ASE">; 146def FeatureDSPR2 : SubtargetFeature<"dspr2", "HasDSPR2", "true", 147 "Mips DSP-R2 ASE", [FeatureDSP]>; 148 149def FeatureMSA : SubtargetFeature<"msa", "HasMSA", "true", "Mips MSA ASE">; 150 151def FeatureMicroMips : SubtargetFeature<"micromips", "InMicroMipsMode", "true", 152 "microMips mode">; 153 154def FeatureCnMips : SubtargetFeature<"cnmips", "HasCnMips", 155 "true", "Octeon cnMIPS Support", 156 [FeatureMips64r2]>; 157 158//===----------------------------------------------------------------------===// 159// Mips processors supported. 160//===----------------------------------------------------------------------===// 161 162class Proc<string Name, list<SubtargetFeature> Features> 163 : Processor<Name, MipsGenericItineraries, Features>; 164 165def : Proc<"mips1", [FeatureMips1, FeatureO32]>; 166def : Proc<"mips2", [FeatureMips2, FeatureO32]>; 167def : Proc<"mips32", [FeatureMips32, FeatureO32]>; 168def : Proc<"mips32r2", [FeatureMips32r2, FeatureO32]>; 169def : Proc<"mips32r6", [FeatureMips32r6, FeatureO32]>; 170 171def : Proc<"mips3", [FeatureMips3, FeatureN64]>; 172def : Proc<"mips4", [FeatureMips4, FeatureN64]>; 173def : Proc<"mips5", [FeatureMips5, FeatureN64]>; 174def : Proc<"mips64", [FeatureMips64, FeatureN64]>; 175def : Proc<"mips64r2", [FeatureMips64r2, FeatureN64]>; 176def : Proc<"mips64r6", [FeatureMips64r6, FeatureN64]>; 177def : Proc<"mips16", [FeatureMips16, FeatureO32]>; 178def : Proc<"octeon", [FeatureMips64r2, FeatureN64, FeatureCnMips]>; 179 180def MipsAsmParser : AsmParser { 181 let ShouldEmitMatchRegisterName = 0; 182 let MnemonicContainsDot = 1; 183} 184 185def MipsAsmParserVariant : AsmParserVariant { 186 int Variant = 0; 187 188 // Recognize hard coded registers. 189 string RegisterPrefix = "$"; 190} 191 192def Mips : Target { 193 let InstructionSet = MipsInstrInfo; 194 let AssemblyParsers = [MipsAsmParser]; 195 let AssemblyParserVariants = [MipsAsmParserVariant]; 196}
|