diff options
Diffstat (limited to 'clang/lib/Basic/Targets/Mips.h')
-rw-r--r-- | clang/lib/Basic/Targets/Mips.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/clang/lib/Basic/Targets/Mips.h b/clang/lib/Basic/Targets/Mips.h index 11e9ac91443..fd1db5aa23d 100644 --- a/clang/lib/Basic/Targets/Mips.h +++ b/clang/lib/Basic/Targets/Mips.h @@ -57,7 +57,7 @@ class LLVM_LIBRARY_VISIBILITY MipsTargetInfo : public TargetInfo { bool UseIndirectJumpHazard; protected: - bool HasFP64; + enum FPModeEnum { FPXX, FP32, FP64 } FPMode; std::string ABI; public: @@ -66,7 +66,7 @@ public: IsNan2008(false), IsAbs2008(false), IsSingleFloat(false), IsNoABICalls(false), CanUseBSDABICalls(false), FloatABI(HardFloat), DspRev(NoDSP), HasMSA(false), DisableMadd4(false), - UseIndirectJumpHazard(false), HasFP64(false) { + UseIndirectJumpHazard(false), FPMode(FPXX) { TheCXXABI.set(TargetCXXABI::GenericMIPS); setABI(getTriple().isMIPS32() ? "o32" : "n64"); @@ -181,6 +181,8 @@ public: return TargetInfo::initFeatureMap(Features, Diags, CPU, FeaturesVec); } + unsigned getISARev() const; + void getTargetDefines(const LangOptions &Opts, MacroBuilder &Builder) const override; @@ -305,7 +307,7 @@ public: IsSingleFloat = false; FloatABI = HardFloat; DspRev = NoDSP; - HasFP64 = isFP64Default(); + FPMode = isFP64Default() ? FP64 : FPXX; for (const auto &Feature : Features) { if (Feature == "+single-float") @@ -325,9 +327,11 @@ public: else if (Feature == "+nomadd4") DisableMadd4 = true; else if (Feature == "+fp64") - HasFP64 = true; + FPMode = FP64; else if (Feature == "-fp64") - HasFP64 = false; + FPMode = FP32; + else if (Feature == "+fpxx") + FPMode = FPXX; else if (Feature == "+nan2008") IsNan2008 = true; else if (Feature == "-nan2008") |