[PATCH] D31573: [Builtins] Add IEEE 754 support for __fixunsxfti
Weiming Zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 16:21:56 PDT 2017
weimingz updated this revision to Diff 93967.
weimingz added a comment.
these tests are the only 4 tests that use 128 bit long long.
Other tests that uses HAS_80_BIT_LONG_DOUBLE should be replaced with `__LDBL_MANT_DIG__ == 64`
https://reviews.llvm.org/D31573
Files:
test/builtins/Unit/fixunsxfti_test.c
test/builtins/Unit/fixxfti_test.c
test/builtins/Unit/floattixf_test.c
test/builtins/Unit/floatuntixf_test.c
Index: test/builtins/Unit/floatuntixf_test.c
===================================================================
--- test/builtins/Unit/floatuntixf_test.c
+++ test/builtins/Unit/floatuntixf_test.c
@@ -19,7 +19,7 @@
#include <float.h>
#include <stdio.h>
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
// Returns: convert a to a long double, rounding toward even.
@@ -52,7 +52,7 @@
int main()
{
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
if (test__floatuntixf(0, 0.0))
return 1;
Index: test/builtins/Unit/floattixf_test.c
===================================================================
--- test/builtins/Unit/floattixf_test.c
+++ test/builtins/Unit/floattixf_test.c
@@ -19,7 +19,7 @@
#include <float.h>
#include <stdio.h>
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
// Returns: convert a to a long double, rounding toward even.
@@ -52,7 +52,7 @@
int main()
{
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
if (test__floattixf(0, 0.0))
return 1;
Index: test/builtins/Unit/fixxfti_test.c
===================================================================
--- test/builtins/Unit/fixxfti_test.c
+++ test/builtins/Unit/fixxfti_test.c
@@ -18,7 +18,7 @@
#include "int_lib.h"
#include <stdio.h>
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
// Returns: convert a to a signed long long, rounding toward zero.
@@ -54,7 +54,7 @@
int main()
{
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
if (test__fixxfti(0.0, 0))
return 1;
Index: test/builtins/Unit/fixunsxfti_test.c
===================================================================
--- test/builtins/Unit/fixunsxfti_test.c
+++ test/builtins/Unit/fixunsxfti_test.c
@@ -18,7 +18,7 @@
#include "int_lib.h"
#include <stdio.h>
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
// Returns: convert a to a unsigned long long, rounding toward zero.
// Negative values all become zero.
@@ -56,7 +56,7 @@
int main()
{
-#ifdef CRT_HAS_128BIT
+#if defined(CRT_HAS_128BIT) && __LDBL_MANT_DIG__ == 64
if (test__fixunsxfti(0.0, 0))
return 1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31573.93967.patch
Type: text/x-patch
Size: 2328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170403/1e983329/attachment.bin>
More information about the llvm-commits
mailing list