Skip to content

[libc][arm] Use __ARM_FP to detect floating point support for FEnvImpl. #72177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2023

Conversation

lntue
Copy link
Contributor

@lntue lntue commented Nov 14, 2023

@llvmbot
Copy link
Member

llvmbot commented Nov 14, 2023

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

#72157


Full diff: https://github.com/llvm/llvm-project/pull/72177.diff

1 Files Affected:

  • (modified) libc/src/__support/FPUtil/FEnvImpl.h (+1-2)
diff --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 619f6a0a91c4c7e..6810659733de2c3 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -29,8 +29,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) &&                                      \
-    LIBC_HAS_BUILTIN(__builtin_arm_get_fpscr)
+#elif defined(LIBC_TARGET_ARCH_IS_ARM) && defined(__ARM_FP)
 #include "arm/FEnvImpl.h"
 #elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
 #include "riscv/FEnvImpl.h"

@lntue lntue merged commit 86c57b9 into llvm:main Nov 14, 2023
@lntue lntue deleted the arm_fpscr branch November 15, 2023 06:17
zahiraam pushed a commit to zahiraam/llvm-project that referenced this pull request Nov 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants