@@ -76,14 +76,15 @@ MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS,
7676 IsSingleFloat(false ), IsFPXX(false ), NoABICalls(false ), Abs2008(false ),
7777 IsFP64bit(false ), UseOddSPReg(true ), IsNaN2008bit(false ),
7878 IsGP64bit(false ), HasVFPU(false ), HasCnMips(false ), HasCnMipsP(false ),
79+ HasDIVr6(false ), HasZKM(false ),
7980 HasMips3_32(false ), HasMips3_32r2(false ), HasMips4_32(false ),
8081 HasMips4_32r2(false ), HasMips5_32r2(false ), InMips16Mode(false ),
8182 InMips16HardFloat(Mips16HardFloat), InMicroMipsMode(false ), HasDSP(false ),
8283 HasDSPR2(false ), HasDSPR3(false ),
8384 AllowMixed16_32(Mixed16_32 || Mips_Os16), Os16(Mips_Os16), HasMSA(false ),
8485 UseTCCInDIV(false ), HasSym32(false ), HasEVA(false ), DisableMadd4(false ),
8586 HasMT(false ), HasCRC(false ), HasVirt(false ), HasGINV(false ),
86- UseIndirectJumpsHazard(false ), StrictAlign(false ),
87+ UseIndirectJumpsHazard(false ), StrictAlign(false ), InstSameCost( false ),
8788 StackAlignOverride(StackAlignOverride), TM(TM), TargetTriple(TT),
8889 InstrInfo(
8990 MipsInstrInfo::create (initializeSubtargetDependencies(CPU, FS, TM))),
@@ -147,13 +148,17 @@ MipsSubtarget::MipsSubtarget(const Triple &TT, StringRef CPU, StringRef FS,
147148 if (hasMips32r6 ()) {
148149 StringRef ISA = hasMips64r6 () ? " MIPS64r6" : " MIPS32r6" ;
149150
151+ HasDIVr6 = true ;
150152 assert (isFP64bit ());
151153 assert (isNaN2008 ());
152154 assert (inAbs2008Mode ());
153155 if (hasDSP ())
154156 report_fatal_error (ISA + " is not compatible with the DSP ASE" , false );
155157 }
156158
159+ if (hasZKM ())
160+ HasDIVr6 = true ;
161+
157162 if (NoABICalls && TM.isPositionIndependent ())
158163 report_fatal_error (" position-independent code requires '-mabicalls'" );
159164
0 commit comments