[libc-commits] [libc] [libc][arm] Use __ARM_FP to detect floating point support for FEnvImpl. (PR #72177)

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


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/72177

https://github.com/llvm/llvm-project/issues/72157

>From 848379d361e8b5247331cccfd006a143283c570c Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue at google.com>
Date: Mon, 13 Nov 2023 19:31:46 -0500
Subject: [PATCH] [libc][arm] Use __ARM_FP to detect floating point support for
 FEnvImpl.

---
 libc/src/__support/FPUtil/FEnvImpl.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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"



More information about the libc-commits mailing list