File tree 2 files changed +9
-10
lines changed
2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -804,8 +804,8 @@ template <typename T> LIBC_INLINE static constexpr FPType get_fp_type() {
804
804
else if constexpr (__LDBL_MANT_DIG__ == 113 )
805
805
return FPType::IEEE754_Binary128;
806
806
}
807
- #if defined(LIBC_COMPILER_HAS_C23_FLOAT16 )
808
- else if constexpr (cpp::is_same_v<UnqualT, _Float16 >)
807
+ #if defined(LIBC_TYPES_HAS_FLOAT16 )
808
+ else if constexpr (cpp::is_same_v<UnqualT, float16 >)
809
809
return FPType::IEEE754_Binary16;
810
810
#endif
811
811
#if defined(LIBC_COMPILER_HAS_C23_FLOAT128)
Original file line number Diff line number Diff line change 27
27
#endif
28
28
29
29
// float16 support.
30
+ // TODO: move this logic to "llvm-libc-types/float16.h"
30
31
#if defined(LIBC_TARGET_ARCH_IS_X86_64) && defined(LIBC_TARGET_CPU_HAS_SSE2)
31
32
#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 1500)) || \
32
33
(defined(LIBC_COMPILER_GCC_VER) && (LIBC_COMPILER_GCC_VER >= 1201 ))
33
- #define LIBC_COMPILER_HAS_C23_FLOAT16
34
+ #define LIBC_TYPES_HAS_FLOAT16
35
+ using float16 = _Float16;
34
36
#endif
35
37
#endif
36
38
#if defined(LIBC_TARGET_ARCH_IS_AARCH64)
37
39
#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 900)) || \
38
40
(defined(LIBC_COMPILER_GCC_VER) && (LIBC_COMPILER_GCC_VER >= 1301 ))
39
- #define LIBC_COMPILER_HAS_C23_FLOAT16
41
+ #define LIBC_TYPES_HAS_FLOAT16
42
+ using float16 = _Float16;
40
43
#endif
41
44
#endif
42
45
#if defined(LIBC_TARGET_ARCH_IS_ANY_RISCV)
43
46
#if (defined(LIBC_COMPILER_CLANG_VER) && (LIBC_COMPILER_CLANG_VER >= 1300)) || \
44
47
(defined(LIBC_COMPILER_GCC_VER) && (LIBC_COMPILER_GCC_VER >= 1301 ))
45
- #define LIBC_COMPILER_HAS_C23_FLOAT16
46
- #endif
47
- #endif
48
-
49
- #if defined(LIBC_COMPILER_HAS_C23_FLOAT16)
48
+ #define LIBC_TYPES_HAS_FLOAT16
50
49
using float16 = _Float16;
51
- #define LIBC_HAS_FLOAT16
50
+ #endif
52
51
#endif
53
52
54
53
// float128 support.
You can’t perform that action at this time.
0 commit comments