[libc-commits] [libc] Remove wrong float-128 extension for CLang (PR #75909)
Igor Popov via libc-commits
libc-commits at lists.llvm.org
Tue Dec 19 19:20:15 PST 2023
https://github.com/silver-popov updated https://github.com/llvm/llvm-project/pull/75909
>From 97260fcd4a6823e2bc39c16e92d8a4311c27926e Mon Sep 17 00:00:00 2001
From: Igor Popov <popov.nirvana at gmail.com>
Date: Tue, 19 Dec 2023 11:43:45 +0300
Subject: [PATCH 1/2] Remove wrong float-128 extension for CLang
---
libc/src/__support/macros/properties/float.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 756579024cad8b..1953a6b6ef6250 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -59,11 +59,6 @@ using float16 = _Float16;
defined(LIBC_TARGET_ARCH_IS_X86_64))
#define LIBC_COMPILER_HAS_C23_FLOAT128
#endif
-#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 500)) && \
- (defined(LIBC_TARGET_ARCH_IS_X86_64) && \
- !defined(LIBC_TARGET_OS_IS_FUCHSIA))
-#define LIBC_COMPILER_HAS_FLOAT128_EXTENSION
-#endif
#if defined(LIBC_COMPILER_HAS_C23_FLOAT128)
using float128 = _Float128;
>From ee6b22801e6f9ba941ad46a2c20082ef0275c288 Mon Sep 17 00:00:00 2001
From: Igor Popov <popov.nirvana at gmail.com>
Date: Wed, 20 Dec 2023 06:18:30 +0300
Subject: [PATCH 2/2] [libc] Fix float128 support
---
libc/src/__support/macros/properties/float.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libc/src/__support/macros/properties/float.h b/libc/src/__support/macros/properties/float.h
index 1953a6b6ef6250..98ca2a5d4bc46f 100644
--- a/libc/src/__support/macros/properties/float.h
+++ b/libc/src/__support/macros/properties/float.h
@@ -59,6 +59,11 @@ using float16 = _Float16;
defined(LIBC_TARGET_ARCH_IS_X86_64))
#define LIBC_COMPILER_HAS_C23_FLOAT128
#endif
+#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 600)) && \
+ (defined(LIBC_TARGET_ARCH_IS_X86_64) && \
+ defined(LIBC_TARGET_OS_IS_LINUX) && !defined(LIBC_TARGET_OS_IS_FUCHSIA))
+#define LIBC_COMPILER_HAS_FLOAT128_EXTENSION
+#endif
#if defined(LIBC_COMPILER_HAS_C23_FLOAT128)
using float128 = _Float128;
More information about the libc-commits
mailing list