================
@@ -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__");
----------------
chenzheng1030 wrote:

Sorry, I am not familiar with these macros. But I don't think GCC will always 
define `__RSQRTEF__` macro for all PowerPC versions. With -mcpu=power4, this 
macro is not defined, see https://godbolt.org/z/6W9f3adT1

https://github.com/llvm/llvm-project/pull/106012
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to