diff options
author | Reid Kleckner <rnk@google.com> | 2018-10-30 20:51:27 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2018-10-30 20:51:27 +0000 |
commit | 091cd599a07a8a8a47e5bc5d425821db3fc0ca61 (patch) | |
tree | 1ca83af0d2c2a09745f3a4abb3ea045fd3efea54 /lib/builtins | |
parent | 98b45bc391b72b4372fffe1c15b66802cac71ebd (diff) | |
download | compiler-rt-091cd599a07a8a8a47e5bc5d425821db3fc0ca61.tar.gz |
[builtins] Re-enable x86-only long double tests
Summary:
In r81552, the HAS_80_BIT_LONG_DOUBLE macro was added to the unit test
only version of int_lib.h. One month later in r85260 the duplicate
int_lib.h was removed, but the tests still passed because we don't build
with -Werror.
This is the minimal change to bring it back, and I decided to put the
configuration macro next to our 128-bit integer support macro.
Reviewers: joerg, compnerd, mstorsjo
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D53838
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@345645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/builtins')
-rw-r--r-- | lib/builtins/int_types.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/builtins/int_types.h b/lib/builtins/int_types.h index f53f343d3..8917ff83e 100644 --- a/lib/builtins/int_types.h +++ b/lib/builtins/int_types.h @@ -137,6 +137,18 @@ typedef struct #endif /* _YUGA_LITTLE_ENDIAN */ } uqwords; +/* 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__) +#define HAS_80_BIT_LONG_DOUBLE 1 +#else +#define HAS_80_BIT_LONG_DOUBLE 0 +#endif + typedef union { uqwords u; |