[libc-commits] [libc] [libc] Make sure we have RISC-V f or d extension before using it (PR #104476)
via libc-commits
libc-commits at lists.llvm.org
Thu Aug 15 10:45:04 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Petr Hosek (petrhosek)
<details>
<summary>Changes</summary>
This matches what we do for other architectures.
---
Full diff: https://github.com/llvm/llvm-project/pull/104476.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 4bb31a6f4c426c..1c5a1108ff9e0b 100644
--- a/libc/src/__support/FPUtil/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/FEnvImpl.h
@@ -31,7 +31,7 @@
#include "x86_64/FEnvImpl.h"
#elif defined(LIBC_TARGET_ARCH_IS_ARM) && defined(__ARM_FP)
#include "arm/FEnvImpl.h"
-#elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
+#elif defined(LIBC_TARGET_ARCH_IS_ANY_RISCV) && defined(__riscv_flen)
#include "riscv/FEnvImpl.h"
#else
``````````
</details>
https://github.com/llvm/llvm-project/pull/104476
More information about the libc-commits
mailing list