[clang] [clang][Driver] Define soft float macros for PPC. (PR #106012)
Alex Rønne Petersen via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 27 06:37:12 PDT 2024
================
@@ -402,9 +402,16 @@ void PPCTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__VEC__", "10206");
Builder.defineMacro("__ALTIVEC__");
}
- if (HasSPE) {
+ if (HasSPE)
Builder.defineMacro("__SPE__");
+ if (HasSPE || FloatABI == SoftFloat)
Builder.defineMacro("__NO_FPRS__");
+ if (FloatABI == SoftFloat) {
+ Builder.defineMacro("_SOFT_FLOAT");
+ Builder.defineMacro("_SOFT_DOUBLE");
+ } else {
+ Builder.defineMacro("__RSQRTE__");
+ Builder.defineMacro("__RSQRTEF__");
----------------
alexrp wrote:
Something like what I just pushed?
https://github.com/llvm/llvm-project/pull/106012
More information about the cfe-commits
mailing list