[compiler-rt] r345645 - [builtins] Re-enable x86-only long double tests
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 13:51:27 PDT 2018
Author: rnk
Date: Tue Oct 30 13:51:27 2018
New Revision: 345645
URL: http://llvm.org/viewvc/llvm-project?rev=345645&view=rev
Log:
[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
Modified:
compiler-rt/trunk/lib/builtins/int_types.h
compiler-rt/trunk/test/builtins/Unit/fixxfdi_test.c
Modified: compiler-rt/trunk/lib/builtins/int_types.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/int_types.h?rev=345645&r1=345644&r2=345645&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/int_types.h (original)
+++ compiler-rt/trunk/lib/builtins/int_types.h Tue Oct 30 13:51:27 2018
@@ -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;
Modified: compiler-rt/trunk/test/builtins/Unit/fixxfdi_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixxfdi_test.c?rev=345645&r1=345644&r2=345645&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixxfdi_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixxfdi_test.c Tue Oct 30 13:51:27 2018
@@ -26,7 +26,7 @@
// gggg gggg gggg gggg gggg gggg gggg gggg | gggg gggg gggg gggg seee eeee eeee eeee |
// 1mmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-COMPILER_RT_ABI di_int __sfixxfdi(long double a);
+COMPILER_RT_ABI di_int __fixxfdi(long double a);
int test__fixxfdi(long double a, di_int expected)
{
More information about the llvm-commits
mailing list