[compiler-rt] f398e0f - [builtins][Android] Define HAS_80_BIT_LONG_DOUBLE to 0
Ryan Prichard via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 16:54:02 PDT 2020
Author: Ryan Prichard
Date: 2020-07-13T16:53:07-07:00
New Revision: f398e0f3d1fd56e5d06e95f3522bdcde48310088
URL: https://github.com/llvm/llvm-project/commit/f398e0f3d1fd56e5d06e95f3522bdcde48310088
DIFF: https://github.com/llvm/llvm-project/commit/f398e0f3d1fd56e5d06e95f3522bdcde48310088.diff
LOG: [builtins][Android] Define HAS_80_BIT_LONG_DOUBLE to 0
Android 32-bit x86 uses a 64-bit long double.
Android 64-bit x86 uses a 128-bit quad-precision long double.
Differential Revision: https://reviews.llvm.org/D82152
Added:
Modified:
compiler-rt/lib/builtins/int_types.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/builtins/int_types.h b/compiler-rt/lib/builtins/int_types.h
index a575c0745656..705355a4840d 100644
--- a/compiler-rt/lib/builtins/int_types.h
+++ b/compiler-rt/lib/builtins/int_types.h
@@ -144,9 +144,12 @@ typedef struct {
// Check if the target supports 80 bit extended precision long doubles.
// Notably, on x86 Windows, MSVC only provides a 64-bit long double, but GCC
// still makes it 80 bits. Clang will match whatever compiler it is trying to
-// be compatible with.
-#if ((defined(__i386__) || defined(__x86_64__)) && !defined(_MSC_VER)) || \
- defined(__m68k__) || defined(__ia64__)
+// be compatible with. On 32-bit x86 Android, long double is 64 bits, while on
+// x86_64 Android, long double is 128 bits.
+#if (defined(__i386__) || defined(__x86_64__)) && \
+ !(defined(_MSC_VER) || defined(__ANDROID__))
+#define HAS_80_BIT_LONG_DOUBLE 1
+#elif defined(__m68k__) || defined(__ia64__)
#define HAS_80_BIT_LONG_DOUBLE 1
#else
#define HAS_80_BIT_LONG_DOUBLE 0
More information about the llvm-commits
mailing list