[libc-commits] [libc] 157c3fb - [libc] Make sure we have RISC-V f or d extension before using it (#104476)

via libc-commits libc-commits at lists.llvm.org
Thu Aug 15 15:53:40 PDT 2024


Author: Petr Hosek
Date: 2024-08-15T15:53:35-07:00
New Revision: 157c3fb8c794eaade5fb2a9b08a27c912603b085

URL: https://github.com/llvm/llvm-project/commit/157c3fb8c794eaade5fb2a9b08a27c912603b085
DIFF: https://github.com/llvm/llvm-project/commit/157c3fb8c794eaade5fb2a9b08a27c912603b085.diff

LOG: [libc] Make sure we have RISC-V f or d extension before using it (#104476)

This matches what we do for other architectures.

Added: 
    

Modified: 
    libc/src/__support/FPUtil/FEnvImpl.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/FPUtil/FEnvImpl.h b/libc/src/__support/FPUtil/FEnvImpl.h
index 4bb31a6f4c426..1c5a1108ff9e0 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
 


        


More information about the libc-commits mailing list