[libc-commits] [libc] [libc] Add detection support for float16 (PR #73372)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Fri Nov 24 13:55:55 PST 2023
================
@@ -15,32 +15,70 @@
#include "src/__support/macros/properties/compiler.h"
#include "src/__support/macros/properties/os.h"
-// https://developer.arm.com/documentation/dui0491/i/C-and-C---Implementation-Details/Basic-data-types
-// https://developer.apple.com/documentation/xcode/writing-arm64-code-for-apple-platforms
-// https://docs.amd.com/bundle/HIP-Programming-Guide-v5.1/page/Programming_with_HIP.html
-#if defined(LIBC_TARGET_OS_IS_WINDOWS) || \
- (defined(LIBC_TARGET_OS_IS_MACOS) && \
- defined(LIBC_TARGET_ARCH_IS_AARCH64)) || \
- defined(LIBC_TARGET_ARCH_IS_ARM) || defined(LIBC_TARGET_ARCH_IS_NVPTX) || \
- defined(LIBC_TARGET_ARCH_IS_AMDGPU)
+#include <float.h> // LDBL_MANT_DIG
+
+// 'long double' properties.
+#if (LDBL_MANT_DIG == DBL_MANT_DIG)
----------------
jhuber6 wrote:
Double checked, this behaves as expected for NVPTX and AMDGPU so no complaints from me.
https://github.com/llvm/llvm-project/pull/73372
More information about the libc-commits
mailing list