Skip to content

Commit ab6deee

Browse files
only use __SIZEOF_LONG_DOUBLE__ when it's 12
1 parent 120eec3 commit ab6deee

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

libc/src/__support/FPUtil/FPBits.h

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

129129
template <> struct FPLayout<FPType::X86_Binary80> {
130-
// x86_64
131-
#if __SIZEOF_LONG_DOUBLE__ == 16
132-
using StorageType = UInt128;
133-
// i386-linux-gnu
134-
#elif __SIZEOF_LONG_DOUBLE__ == 12
130+
#if __SIZEOF_LONG_DOUBLE__ == 12
135131
using StorageType = UInt<__SIZEOF_LONG_DOUBLE__ * CHAR_BIT>;
136132
#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"
133+
using StorageType = UInt128;
141134
#endif
142135
LIBC_INLINE_VAR static constexpr int SIGN_LEN = 1;
143136
LIBC_INLINE_VAR static constexpr int EXP_LEN = 15;

0 commit comments

Comments
 (0)