[PATCH] D53838: [builtins] Re-enable x86-only long double tests
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 29 15:11:13 PDT 2018
rnk created this revision.
rnk added reviewers: joerg, compnerd, mstorsjo.
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.
https://reviews.llvm.org/D53838
Files:
compiler-rt/lib/builtins/int_types.h
compiler-rt/test/builtins/Unit/fixxfdi_test.c
Index: compiler-rt/test/builtins/Unit/fixxfdi_test.c
===================================================================
--- compiler-rt/test/builtins/Unit/fixxfdi_test.c
+++ compiler-rt/test/builtins/Unit/fixxfdi_test.c
@@ -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)
{
Index: compiler-rt/lib/builtins/int_types.h
===================================================================
--- compiler-rt/lib/builtins/int_types.h
+++ compiler-rt/lib/builtins/int_types.h
@@ -137,6 +137,16 @@
#endif /* _YUGA_LITTLE_ENDIAN */
} uqwords;
+/* Indicate if we have an Intel style extended 80 bit long double. Notably, on
+ * Windows, MSVC makes long double 64 bits, but GCC still makes it 80 bits.
+ * Clang will match whatever compiler it is pretending to be.
+ */
+#if (defined(__i386__) || defined(__x86_64__)) && !defined(_MSC_VER)
+#define HAS_80_BIT_LONG_DOUBLE 1
+#else
+#define HAS_80_BIT_LONG_DOUBLE 0
+#endif
+
typedef union
{
uqwords u;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53838.171585.patch
Type: text/x-patch
Size: 1253 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181029/48bfd5bb/attachment.bin>
More information about the llvm-commits
mailing list