Skip to content

Commit 4947d04

Browse files
todo for android
1 parent c4cc557 commit 4947d04

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

libc/src/__support/FPUtil/FPBits.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,17 @@ template <> struct FPLayout<FPType::IEEE754_Binary128> {
127127
};
128128

129129
template <> struct FPLayout<FPType::X86_Binary80> {
130+
// x86_64
130131
#if __SIZEOF_LONG_DOUBLE__ == 16
131132
using StorageType = UInt128;
132-
#else
133+
// i386-linux-gnu
134+
#elif __SIZEOF_LONG_DOUBLE__ == 12
133135
using StorageType = UInt<__SIZEOF_LONG_DOUBLE__ * CHAR_BIT>;
136+
#else
137+
# TODO: https://github.com/llvm/llvm-project/issues/115184
138+
# Android i386 uses `long double == double` i.e. `sizeof(long double) == 8`
139+
# https://developer.android.com/ndk/guides/abis#x86
140+
#error "unexpected size of long double"
134141
#endif
135142
LIBC_INLINE_VAR static constexpr int SIGN_LEN = 1;
136143
LIBC_INLINE_VAR static constexpr int EXP_LEN = 15;

0 commit comments

Comments
 (0)