mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
[mips] Marked up instructions added in MIPS-III and tested that IAS for -mcpu=mips[12] does not accept them
Summary: This required a new instruction group representing the 32-bit subset of MIPS-III that was available in MIPS32 A small number of instructions are correctly rejected but with the wrong error message. These have been placed in a separate test for now. There's some obvious InstAlias's that ought to be marked MIPS-III but arent. This is because they are not currently tested. I intend to catch these with a final pass through the tablegen records to find tablegen records without ISA annotations. Depends on D3674 Reviewers: vmedic Reviewed By: vmedic Differential Revision: http://reviews.llvm.org/D3675 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208408 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -90,10 +90,23 @@ def FeatureMips1 : SubtargetFeature<"mips1", "MipsArchVersion", "Mips1",
|
||||
def FeatureMips2 : SubtargetFeature<"mips2", "MipsArchVersion", "Mips2",
|
||||
"Mips II ISA Support [highly experimental]",
|
||||
[FeatureMips1]>;
|
||||
def FeatureMips3_32 : SubtargetFeature<"mips3_32", "HasMips3_32", "true",
|
||||
"Subset of MIPS-III that is also in MIPS32 "
|
||||
"[highly experimental]">;
|
||||
def FeatureMips3 : SubtargetFeature<"mips3", "MipsArchVersion", "Mips3",
|
||||
"MIPS III ISA Support [highly experimental]",
|
||||
[FeatureMips2, FeatureMips3_32,
|
||||
FeatureGP64Bit, FeatureFP64Bit]>;
|
||||
def FeatureMips4 : SubtargetFeature<"mips4", "MipsArchVersion",
|
||||
"Mips4", "MIPS IV ISA Support",
|
||||
[FeatureMips3, FeatureFPIdx, FeatureCondMov]>;
|
||||
def FeatureMips5 : SubtargetFeature<"mips5", "MipsArchVersion", "Mips5",
|
||||
"MIPS V ISA Support [highly experimental]",
|
||||
[FeatureMips4]>;
|
||||
def FeatureMips32 : SubtargetFeature<"mips32", "MipsArchVersion", "Mips32",
|
||||
"Mips32 ISA Support",
|
||||
[FeatureMips2, FeatureCondMov,
|
||||
FeatureBitCount]>;
|
||||
[FeatureMips2, FeatureMips3_32,
|
||||
FeatureCondMov, FeatureBitCount]>;
|
||||
def FeatureMips32r2 : SubtargetFeature<"mips32r2", "MipsArchVersion",
|
||||
"Mips32r2", "Mips32r2 ISA Support",
|
||||
[FeatureMips32, FeatureSEInReg, FeatureSwap,
|
||||
@@ -103,18 +116,6 @@ def FeatureMips32r6 : SubtargetFeature<"mips32r6", "MipsArchVersion",
|
||||
"Mips32r6 ISA Support [experimental]",
|
||||
[FeatureMips32r2, FeatureFP64Bit,
|
||||
FeatureNaN2008]>;
|
||||
// FIXME: Need to check whether FPIdx belongs in the MIPS-III or MIPS-IV Implies
|
||||
// list but for now it doesn't matter since FPIdx isn't actually attached
|
||||
// to any instructions.
|
||||
def FeatureMips3 : SubtargetFeature<"mips3", "MipsArchVersion", "Mips3",
|
||||
"MIPS III ISA Support [highly experimental]",
|
||||
[FeatureMips2, FeatureGP64Bit, FeatureFP64Bit]>;
|
||||
def FeatureMips4 : SubtargetFeature<"mips4", "MipsArchVersion",
|
||||
"Mips4", "MIPS IV ISA Support",
|
||||
[FeatureMips3, FeatureFPIdx, FeatureCondMov]>;
|
||||
def FeatureMips5 : SubtargetFeature<"mips5", "MipsArchVersion", "Mips5",
|
||||
"MIPS V ISA Support [highly experimental]",
|
||||
[FeatureMips4]>;
|
||||
def FeatureMips64 : SubtargetFeature<"mips64", "MipsArchVersion",
|
||||
"Mips64", "Mips64 ISA Support",
|
||||
[FeatureMips5, FeatureMips32, FeatureFPIdx]>;
|
||||
|
@@ -61,10 +61,11 @@ let isPseudo = 1, isCodeGenOnly = 1 in {
|
||||
//===----------------------------------------------------------------------===//
|
||||
let DecoderNamespace = "Mips64" in {
|
||||
/// Arithmetic Instructions (ALU Immediate)
|
||||
def DADDi : ArithLogicI<"daddi", simm16_64, GPR64Opnd>, ADDI_FM<0x18>;
|
||||
def DADDi : ArithLogicI<"daddi", simm16_64, GPR64Opnd>, ADDI_FM<0x18>,
|
||||
ISA_MIPS3;
|
||||
def DADDiu : ArithLogicI<"daddiu", simm16_64, GPR64Opnd, II_DADDIU,
|
||||
immSExt16, add>,
|
||||
ADDI_FM<0x19>, IsAsCheapAsAMove;
|
||||
ADDI_FM<0x19>, IsAsCheapAsAMove, ISA_MIPS3;
|
||||
|
||||
let isCodeGenOnly = 1 in {
|
||||
def SLTi64 : SetCC_I<"slti", setlt, simm16_64, immSExt16, GPR64Opnd>,
|
||||
@@ -81,12 +82,14 @@ def LUi64 : LoadUpper<"lui", GPR64Opnd, uimm16_64>, LUI_FM;
|
||||
}
|
||||
|
||||
/// Arithmetic Instructions (3-Operand, R-Type)
|
||||
def DADD : ArithLogicR<"dadd", GPR64Opnd, 1, II_DADD>, ADD_FM<0, 0x2c>;
|
||||
def DADDu : ArithLogicR<"daddu", GPR64Opnd, 1, II_DADDU, add>,
|
||||
ADD_FM<0, 0x2d>;
|
||||
def DSUBu : ArithLogicR<"dsubu", GPR64Opnd, 0, II_DSUBU, sub>,
|
||||
ADD_FM<0, 0x2f>;
|
||||
def DSUB : ArithLogicR<"dsub", GPR64Opnd, 0, II_DSUB>, ADD_FM<0, 0x2e>;
|
||||
def DADD : ArithLogicR<"dadd", GPR64Opnd, 1, II_DADD>, ADD_FM<0, 0x2c>,
|
||||
ISA_MIPS3;
|
||||
def DADDu : ArithLogicR<"daddu", GPR64Opnd, 1, II_DADDU, add>, ADD_FM<0, 0x2d>,
|
||||
ISA_MIPS3;
|
||||
def DSUBu : ArithLogicR<"dsubu", GPR64Opnd, 0, II_DSUBU, sub>, ADD_FM<0, 0x2f>,
|
||||
ISA_MIPS3;
|
||||
def DSUB : ArithLogicR<"dsub", GPR64Opnd, 0, II_DSUB>, ADD_FM<0, 0x2e>,
|
||||
ISA_MIPS3;
|
||||
|
||||
let isCodeGenOnly = 1 in {
|
||||
def SLT64 : SetCC_R<"slt", setlt, GPR64Opnd>, ADD_FM<0, 0x2a>;
|
||||
@@ -99,23 +102,23 @@ def NOR64 : LogicNOR<"nor", GPR64Opnd>, ADD_FM<0, 0x27>;
|
||||
|
||||
/// Shift Instructions
|
||||
def DSLL : shift_rotate_imm<"dsll", uimm6, GPR64Opnd, II_DSLL, shl, immZExt6>,
|
||||
SRA_FM<0x38, 0>;
|
||||
SRA_FM<0x38, 0>, ISA_MIPS3;
|
||||
def DSRL : shift_rotate_imm<"dsrl", uimm6, GPR64Opnd, II_DSRL, srl, immZExt6>,
|
||||
SRA_FM<0x3a, 0>;
|
||||
SRA_FM<0x3a, 0>, ISA_MIPS3;
|
||||
def DSRA : shift_rotate_imm<"dsra", uimm6, GPR64Opnd, II_DSRA, sra, immZExt6>,
|
||||
SRA_FM<0x3b, 0>;
|
||||
SRA_FM<0x3b, 0>, ISA_MIPS3;
|
||||
def DSLLV : shift_rotate_reg<"dsllv", GPR64Opnd, II_DSLLV, shl>,
|
||||
SRLV_FM<0x14, 0>;
|
||||
SRLV_FM<0x14, 0>, ISA_MIPS3;
|
||||
def DSRLV : shift_rotate_reg<"dsrlv", GPR64Opnd, II_DSRLV, srl>,
|
||||
SRLV_FM<0x16, 0>;
|
||||
SRLV_FM<0x16, 0>, ISA_MIPS3;
|
||||
def DSRAV : shift_rotate_reg<"dsrav", GPR64Opnd, II_DSRAV, sra>,
|
||||
SRLV_FM<0x17, 0>;
|
||||
SRLV_FM<0x17, 0>, ISA_MIPS3;
|
||||
def DSLL32 : shift_rotate_imm<"dsll32", uimm5, GPR64Opnd, II_DSLL32>,
|
||||
SRA_FM<0x3c, 0>;
|
||||
SRA_FM<0x3c, 0>, ISA_MIPS3;
|
||||
def DSRL32 : shift_rotate_imm<"dsrl32", uimm5, GPR64Opnd, II_DSRL32>,
|
||||
SRA_FM<0x3e, 0>;
|
||||
SRA_FM<0x3e, 0>, ISA_MIPS3;
|
||||
def DSRA32 : shift_rotate_imm<"dsra32", uimm5, GPR64Opnd, II_DSRA32>,
|
||||
SRA_FM<0x3f, 0>;
|
||||
SRA_FM<0x3f, 0>, ISA_MIPS3;
|
||||
|
||||
// Rotate Instructions
|
||||
def DROTR : shift_rotate_imm<"drotr", uimm6, GPR64Opnd, II_DROTR, rotr,
|
||||
@@ -139,9 +142,9 @@ def SH64 : Store<"sh", GPR64Opnd, truncstorei16, II_SH>, LW_FM<0x29>;
|
||||
def SW64 : Store<"sw", GPR64Opnd, truncstorei32, II_SW>, LW_FM<0x2b>;
|
||||
}
|
||||
|
||||
def LWu : Load<"lwu", GPR64Opnd, zextloadi32, II_LWU>, LW_FM<0x27>;
|
||||
def LD : Load<"ld", GPR64Opnd, load, II_LD>, LW_FM<0x37>;
|
||||
def SD : Store<"sd", GPR64Opnd, store, II_SD>, LW_FM<0x3f>;
|
||||
def LWu : Load<"lwu", GPR64Opnd, zextloadi32, II_LWU>, LW_FM<0x27>, ISA_MIPS3;
|
||||
def LD : Load<"ld", GPR64Opnd, load, II_LD>, LW_FM<0x37>, ISA_MIPS3;
|
||||
def SD : Store<"sd", GPR64Opnd, store, II_SD>, LW_FM<0x3f>, ISA_MIPS3;
|
||||
|
||||
/// load/store left/right
|
||||
let isCodeGenOnly = 1 in {
|
||||
@@ -151,14 +154,18 @@ def SWL64 : StoreLeftRight<"swl", MipsSWL, GPR64Opnd, II_SWL>, LW_FM<0x2a>;
|
||||
def SWR64 : StoreLeftRight<"swr", MipsSWR, GPR64Opnd, II_SWR>, LW_FM<0x2e>;
|
||||
}
|
||||
|
||||
def LDL : LoadLeftRight<"ldl", MipsLDL, GPR64Opnd, II_LDL>, LW_FM<0x1a>;
|
||||
def LDR : LoadLeftRight<"ldr", MipsLDR, GPR64Opnd, II_LDR>, LW_FM<0x1b>;
|
||||
def SDL : StoreLeftRight<"sdl", MipsSDL, GPR64Opnd, II_SDL>, LW_FM<0x2c>;
|
||||
def SDR : StoreLeftRight<"sdr", MipsSDR, GPR64Opnd, II_SDR>, LW_FM<0x2d>;
|
||||
def LDL : LoadLeftRight<"ldl", MipsLDL, GPR64Opnd, II_LDL>, LW_FM<0x1a>,
|
||||
ISA_MIPS3;
|
||||
def LDR : LoadLeftRight<"ldr", MipsLDR, GPR64Opnd, II_LDR>, LW_FM<0x1b>,
|
||||
ISA_MIPS3;
|
||||
def SDL : StoreLeftRight<"sdl", MipsSDL, GPR64Opnd, II_SDL>, LW_FM<0x2c>,
|
||||
ISA_MIPS3;
|
||||
def SDR : StoreLeftRight<"sdr", MipsSDR, GPR64Opnd, II_SDR>, LW_FM<0x2d>,
|
||||
ISA_MIPS3;
|
||||
|
||||
/// Load-linked, Store-conditional
|
||||
def LLD : LLBase<"lld", GPR64Opnd>, LW_FM<0x34>;
|
||||
def SCD : SCBase<"scd", GPR64Opnd>, LW_FM<0x3c>;
|
||||
def LLD : LLBase<"lld", GPR64Opnd>, LW_FM<0x34>, ISA_MIPS3;
|
||||
def SCD : SCBase<"scd", GPR64Opnd>, LW_FM<0x3c>, ISA_MIPS3;
|
||||
|
||||
/// Jump and Branch Instructions
|
||||
let isCodeGenOnly = 1 in {
|
||||
@@ -176,17 +183,17 @@ def TAILCALL64_R : TailCallReg<GPR64Opnd, JR, GPR32Opnd>;
|
||||
|
||||
/// Multiply and Divide Instructions.
|
||||
def DMULT : Mult<"dmult", II_DMULT, GPR64Opnd, [HI0_64, LO0_64]>,
|
||||
MULT_FM<0, 0x1c>;
|
||||
MULT_FM<0, 0x1c>, ISA_MIPS3;
|
||||
def DMULTu : Mult<"dmultu", II_DMULTU, GPR64Opnd, [HI0_64, LO0_64]>,
|
||||
MULT_FM<0, 0x1d>;
|
||||
MULT_FM<0, 0x1d>, ISA_MIPS3;
|
||||
def PseudoDMULT : MultDivPseudo<DMULT, ACC128, GPR64Opnd, MipsMult,
|
||||
II_DMULT>;
|
||||
def PseudoDMULTu : MultDivPseudo<DMULTu, ACC128, GPR64Opnd, MipsMultu,
|
||||
II_DMULTU>;
|
||||
def DSDIV : Div<"ddiv", II_DDIV, GPR64Opnd, [HI0_64, LO0_64]>,
|
||||
MULT_FM<0, 0x1e>;
|
||||
MULT_FM<0, 0x1e>, ISA_MIPS3;
|
||||
def DUDIV : Div<"ddivu", II_DDIVU, GPR64Opnd, [HI0_64, LO0_64]>,
|
||||
MULT_FM<0, 0x1f>;
|
||||
MULT_FM<0, 0x1f>, ISA_MIPS3;
|
||||
def PseudoDSDIV : MultDivPseudo<DSDIV, ACC128, GPR64Opnd, MipsDivRem,
|
||||
II_DDIV, 0, 1, 1>;
|
||||
def PseudoDUDIV : MultDivPseudo<DUDIV, ACC128, GPR64Opnd, MipsDivRemU,
|
||||
@@ -440,7 +447,8 @@ def : MipsInstAlias<"addu $rs, $imm",
|
||||
(ADDiu GPR32Opnd:$rs, GPR32Opnd:$rs, simm16:$imm),
|
||||
0>;
|
||||
def : MipsInstAlias<"dsll $rd, $rt, $rs",
|
||||
(DSLLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>;
|
||||
(DSLLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
|
||||
ISA_MIPS3;
|
||||
def : MipsInstAlias<"dsubu $rt, $rs, $imm",
|
||||
(DADDiu GPR64Opnd:$rt, GPR64Opnd:$rs,
|
||||
InvertedImOperand64:$imm), 0>;
|
||||
@@ -453,16 +461,18 @@ def : MipsInstAlias<"dsubu $rs, $imm",
|
||||
InvertedImOperand64:$imm),
|
||||
0>;
|
||||
def : MipsInstAlias<"dsra $rd, $rt, $rs",
|
||||
(DSRAV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>;
|
||||
(DSRAV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
|
||||
ISA_MIPS3;
|
||||
def : MipsInstAlias<"dsrl $rd, $rt, $rs",
|
||||
(DSRLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>;
|
||||
(DSRLV GPR64Opnd:$rd, GPR64Opnd:$rt, GPR32Opnd:$rs), 0>,
|
||||
ISA_MIPS3;
|
||||
|
||||
/// Move between CPU and coprocessor registers
|
||||
let DecoderNamespace = "Mips64", Predicates = [HasMips64] in {
|
||||
def DMFC0 : MFC3OP<"dmfc0", GPR64Opnd>, MFC3OP_FM<0x10, 1>;
|
||||
def DMTC0 : MFC3OP<"dmtc0", GPR64Opnd>, MFC3OP_FM<0x10, 5>;
|
||||
def DMFC2 : MFC3OP<"dmfc2", GPR64Opnd>, MFC3OP_FM<0x12, 1>;
|
||||
def DMTC2 : MFC3OP<"dmtc2", GPR64Opnd>, MFC3OP_FM<0x12, 5>;
|
||||
def DMTC0 : MFC3OP<"dmtc0", GPR64Opnd>, MFC3OP_FM<0x10, 5>, ISA_MIPS3;
|
||||
def DMFC2 : MFC3OP<"dmfc2", GPR64Opnd>, MFC3OP_FM<0x12, 1>, ISA_MIPS3;
|
||||
def DMTC2 : MFC3OP<"dmtc2", GPR64Opnd>, MFC3OP_FM<0x12, 5>, ISA_MIPS3;
|
||||
}
|
||||
|
||||
// Two operand (implicit 0 selector) versions:
|
||||
|
@@ -298,9 +298,9 @@ let DecoderNamespace = "Mips64" in {
|
||||
def CVT_S_W : MMRel, ABSS_FT<"cvt.s.w", FGR32Opnd, FGR32Opnd, II_CVT>,
|
||||
ABSS_FM<0x20, 20>;
|
||||
def CVT_L_S : MMRel, ABSS_FT<"cvt.l.s", FGR64Opnd, FGR32Opnd, II_CVT>,
|
||||
ABSS_FM<0x25, 16>;
|
||||
ABSS_FM<0x25, 16>, INSN_MIPS3_32;
|
||||
def CVT_L_D64: MMRel, ABSS_FT<"cvt.l.d", FGR64Opnd, FGR64Opnd, II_CVT>,
|
||||
ABSS_FM<0x25, 17>;
|
||||
ABSS_FM<0x25, 17>, INSN_MIPS3_32;
|
||||
|
||||
def CVT_S_D32 : MMRel, ABSS_FT<"cvt.s.d", FGR32Opnd, AFGR64Opnd, II_CVT>,
|
||||
ABSS_FM<0x20, 17>, FGR_32;
|
||||
@@ -358,9 +358,9 @@ def MFHC1 : MMRel, MFC1_FT<"mfhc1", GPR32Opnd, FGRH32Opnd, II_MFHC1>,
|
||||
def MTHC1 : MMRel, MTC1_FT<"mthc1", FGRH32Opnd, GPR32Opnd, II_MTHC1>,
|
||||
MFC1_FM<7>;
|
||||
def DMFC1 : MFC1_FT<"dmfc1", GPR64Opnd, FGR64Opnd, II_DMFC1,
|
||||
bitconvert>, MFC1_FM<1>;
|
||||
bitconvert>, MFC1_FM<1>, ISA_MIPS3;
|
||||
def DMTC1 : MTC1_FT<"dmtc1", FGR64Opnd, GPR64Opnd, II_DMTC1,
|
||||
bitconvert>, MFC1_FM<5>;
|
||||
bitconvert>, MFC1_FM<5>, ISA_MIPS3;
|
||||
|
||||
def FMOV_S : MMRel, ABSS_FT<"mov.s", FGR32Opnd, FGR32Opnd, II_MOV_S>,
|
||||
ABSS_FM<0x6, 16>;
|
||||
|
@@ -158,6 +158,10 @@ def HasFPIdx : Predicate<"Subtarget.hasFPIdx()">,
|
||||
AssemblerPredicate<"FeatureFPIdx">;
|
||||
def HasMips2 : Predicate<"Subtarget.hasMips2()">,
|
||||
AssemblerPredicate<"FeatureMips2">;
|
||||
def HasMips3_32 : Predicate<"Subtarget.hasMips3_32()">,
|
||||
AssemblerPredicate<"FeatureMips3_32">;
|
||||
def HasMips3 : Predicate<"Subtarget.hasMips3()">,
|
||||
AssemblerPredicate<"FeatureMips3">;
|
||||
def HasMips32 : Predicate<"Subtarget.hasMips32()">,
|
||||
AssemblerPredicate<"FeatureMips32">;
|
||||
def HasMips32r2 : Predicate<"Subtarget.hasMips32r2()">,
|
||||
@@ -209,9 +213,13 @@ class GPR_64 { list<Predicate> GPRPredicates = [IsGP64bit]; }
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
class ISA_MIPS2 { list<Predicate> InsnPredicates = [HasMips2]; }
|
||||
class ISA_MIPS3 { list<Predicate> InsnPredicates = [HasMips3]; }
|
||||
class ISA_MIPS32R2 { list<Predicate> InsnPredicates = [HasMips32r2]; }
|
||||
class ISA_MIPS64R2 { list<Predicate> InsnPredicates = [HasMips64r2]; }
|
||||
|
||||
// The portions of MIPS-III that were also added to MIPS32
|
||||
class INSN_MIPS3_32 { list<Predicate> InsnPredicates = [HasMips3_32]; }
|
||||
|
||||
class INSN_SWAP { list<Predicate> InsnPredicates = [HasSwap]; }
|
||||
class INSN_SEINREG { list<Predicate> InsnPredicates = [HasSEInReg]; }
|
||||
|
||||
@@ -1069,7 +1077,7 @@ def BREAK : MMRel, BRK_FT<"break">, BRK_FM<0xd>;
|
||||
def SYSCALL : MMRel, SYS_FT<"syscall">, SYS_FM<0xc>;
|
||||
def TRAP : TrapBase<BREAK>;
|
||||
|
||||
def ERET : MMRel, ER_FT<"eret">, ER_FM<0x18>;
|
||||
def ERET : MMRel, ER_FT<"eret">, ER_FM<0x18>, INSN_MIPS3_32;
|
||||
def DERET : MMRel, ER_FT<"deret">, ER_FM<0x1f>;
|
||||
|
||||
def EI : MMRel, DEI_FT<"ei", GPR32Opnd>, EI_FM<1>;
|
||||
|
@@ -80,12 +80,12 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
|
||||
: MipsGenSubtargetInfo(TT, CPU, FS), MipsArchVersion(Mips32),
|
||||
MipsABI(UnknownABI), IsLittle(little), IsSingleFloat(false),
|
||||
IsFP64bit(false), IsNaN2008bit(false), IsGP64bit(false), HasVFPU(false),
|
||||
HasCnMips(false), IsLinux(true), HasSEInReg(false), HasCondMov(false),
|
||||
HasSwap(false), HasBitCount(false), HasFPIdx(false), InMips16Mode(false),
|
||||
InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false), HasDSP(false),
|
||||
HasDSPR2(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16),
|
||||
HasMSA(false), RM(_RM), OverrideMode(NoOverride), TM(_TM),
|
||||
TargetTriple(TT) {
|
||||
HasCnMips(false), IsLinux(true), HasMips3_32(false), HasSEInReg(false),
|
||||
HasCondMov(false), HasSwap(false), HasBitCount(false), HasFPIdx(false),
|
||||
InMips16Mode(false), InMips16HardFloat(Mips16HardFloat),
|
||||
InMicroMipsMode(false), HasDSP(false), HasDSPR2(false),
|
||||
AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false),
|
||||
RM(_RM), OverrideMode(NoOverride), TM(_TM), TargetTriple(TT) {
|
||||
std::string CPUName = CPU;
|
||||
CPUName = selectMipsCPU(TT, CPUName);
|
||||
|
||||
|
@@ -79,6 +79,9 @@ protected:
|
||||
|
||||
/// Features related to the presence of specific instructions.
|
||||
|
||||
// HasMips3_32 - The subset of MIPS-III instructions added to MIPS32
|
||||
bool HasMips3_32;
|
||||
|
||||
// HasSEInReg - SEB and SEH (signext in register) instructions.
|
||||
bool HasSEInReg;
|
||||
|
||||
@@ -155,6 +158,7 @@ public:
|
||||
void ParseSubtargetFeatures(StringRef CPU, StringRef FS);
|
||||
|
||||
bool hasMips2() const { return MipsArchVersion >= Mips2; }
|
||||
bool hasMips3() const { return MipsArchVersion >= Mips3; }
|
||||
bool hasMips32() const { return MipsArchVersion >= Mips32; }
|
||||
bool hasMips32r2() const { return MipsArchVersion == Mips32r2 ||
|
||||
MipsArchVersion == Mips64r2; }
|
||||
|
Reference in New Issue
Block a user