[clang] [PowerPC] Fix use of FPSCR builtins in smmintrin.h (PR #67299)

Qiu Chaofan via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 9 00:25:38 PDT 2023


================
@@ -68,10 +68,10 @@ extern __inline __m128d
     __asm__("mffsce %0" : "=f"(__fpscr_save.__fr));
     __enables_save.__fpscr = __fpscr_save.__fpscr & 0xf8;
 #else
-    __fpscr_save.__fr = __builtin_mffs();
+    __fpscr_save.__fr = __builtin_ppc_mffs();
----------------
ecnelises wrote:

`__builtin_mffs` aliases to `__builtin_ppc_mffs` through macro. But the compat macros do not always work. In the test cases using `-ffreestanding` or targeting non-AIX non-Linux OSes, the macros will not be defined.

https://github.com/llvm/llvm-project/pull/67299


More information about the cfe-commits mailing list