[libc-commits] [libc] [libc] Check if arm targets support FPSCR in FEnvImpl.h. (PR #72158)

via libc-commits libc-commits at lists.llvm.org
Mon Nov 13 14:42:23 PST 2023


================
@@ -28,7 +28,7 @@
 // the apple condition here should be removed.
 #elif defined(LIBC_TARGET_ARCH_IS_X86) && !defined(__APPLE__)
 #include "x86_64/FEnvImpl.h"
-#elif defined(LIBC_TARGET_ARCH_IS_ARM)
+#elif defined(LIBC_TARGET_ARCH_IS_ARM) && __has_builtin(__builtin_arm_get_fpscr)
----------------
lntue wrote:

gcc also has `__has_builtin` : https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005fbuiltin.html
But I'm switching to use our wrapper macro `LIBC_HAS_BUILTIN` instead.

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


More information about the libc-commits mailing list