[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 21:12:25 PDT 2023


================
@@ -219,9 +234,14 @@ extern __inline __m128
      */
     __asm__("" : : "wa"(__r));
     /* Restore enabled exceptions.  */
-    __fpscr_save.__fr = __builtin_mffsl();
+#ifdef _ARCH_PWR9
+    __fpscr_save.__fr = __builtin_ppc_mffsl();
+#else
+    __fpscr_save.__fr = __builtin_ppc_mffs();
+    __fpscr_save.__fpscr &= 0x70007f0ffL;
----------------
ecnelises wrote:

Implemented by https://github.com/llvm/llvm-project/pull/67299/commits/2c7688c2076cce1d9e33a6881b70e042041078a8

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


More information about the cfe-commits mailing list