[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 12:49:21 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (lntue)
<details>
<summary>Changes</summary>
https://github.com/llvm/llvm-project/issues/72157
---
Full diff: https://github.com/llvm/llvm-project/pull/72158.diff
1 Files Affected:
- (modified) libc/src/__support/FPUtil/FEnvImpl.h (+1-1)
``````````diff
diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 6f2f3c75f512a3e..12f8a66508111fd 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -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)
#include "arm/FEnvImpl.h"
#elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
#include "riscv/FEnvImpl.h"
``````````
</details>
https://github.com/llvm/llvm-project/pull/72158
More information about the libc-commits
mailing list