[PATCH] D53838: [builtins] Re-enable x86-only long double tests
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 30 13:54:38 PDT 2018
This revision was not accepted when it landed; it landed in state "Needs Review".
This revision was automatically updated to reflect the committed changes.
Closed by commit rCRT345645: [builtins] Re-enable x86-only long double tests (authored by rnk, committed by ).
Herald added a subscriber: Sanitizers.
Changed prior to commit:
https://reviews.llvm.org/D53838?vs=171585&id=171786#toc
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D53838
Files:
lib/builtins/int_types.h
test/builtins/Unit/fixxfdi_test.c
Index: test/builtins/Unit/fixxfdi_test.c
===================================================================
--- test/builtins/Unit/fixxfdi_test.c
+++ 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: lib/builtins/int_types.h
===================================================================
--- lib/builtins/int_types.h
+++ lib/builtins/int_types.h
@@ -137,6 +137,18 @@
#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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53838.171786.patch
Type: text/x-patch
Size: 1266 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181030/bde713ca/attachment.bin>
More information about the llvm-commits
mailing list