-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Fix __float128
only available on Linux for x86_64
#75909
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write If you have received no comments on your PR for a week, you can request a review If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@llvm/pr-subscribers-libc Author: Igor Popov (silver-popov) ChangesHello It seems that CLang does not support float-128 extension, at least for x86-64 architecture. #if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 500)) && Full diff: https://github.com/llvm/llvm-project/pull/75909.diff 1 Files Affected:
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;
|
It seems to me that it does support float128 for x86_64. Although there is indeed a mistake, the condition should be |
CLang 17 gives the error message: |
I don't see this happening : https://godbolt.org/z/vsTbT13P1 Do you have a reproducer? Are you specifying a particular |
I'm specifying LIBC_TARGET_TRIPLE="x86_64-pc-none-eabi" |
The environment is MSYS2, CLang64. |
And why float-128 extension was disabled for Fuchsia? |
The issue seems to be coming from OS support It is supported for
|
Compiles successfull. Committed. |
__float128
only available on Linux for x86_64
Hello
It seems that CLang does not support float-128 extension, at least for x86-64 architecture.
For any OS, not only for fuchsia. So, following code causes a compilation error and should be removed.
#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