summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--compiler-rt/test/builtins/Unit/absvti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/addvti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/ashlti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/ashrti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/clzti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/cmpti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/ctzti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/divti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/ffsti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/fixdfti_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/fixsfti_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/fixunsdfti_test.c4
-rw-r--r--compiler-rt/test/builtins/Unit/fixunssfti_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/fixunsxfti_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/fixxfti_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floattidf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floattisf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floattixf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floatuntidf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floatuntisf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/floatuntixf_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/lshrti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/modti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/muloti4_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/multi3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/mulvti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/negti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/negvti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/parityti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/popcountti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/subvti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/ucmpti2_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/udivmodti4_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/udivti3_test.c6
-rw-r--r--compiler-rt/test/builtins/Unit/umodti3_test.c6
35 files changed, 104 insertions, 104 deletions
diff --git a/compiler-rt/test/builtins/Unit/absvti2_test.c b/compiler-rt/test/builtins/Unit/absvti2_test.c
index 8233c18ff09..9b71f200ac7 100644
--- a/compiler-rt/test/builtins/Unit/absvti2_test.c
+++ b/compiler-rt/test/builtins/Unit/absvti2_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: absolute value
// Effects: aborts if abs(x) < 0
@@ -49,7 +49,7 @@ int test__absvti2(ti_int a)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
// if (test__absvti2(make_ti(0x8000000000000000LL, 0))) // should abort
// return 1;
diff --git a/compiler-rt/test/builtins/Unit/addvti3_test.c b/compiler-rt/test/builtins/Unit/addvti3_test.c
index 1cf066c4891..fe093e3b26a 100644
--- a/compiler-rt/test/builtins/Unit/addvti3_test.c
+++ b/compiler-rt/test/builtins/Unit/addvti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a + b
// Effects: aborts if a + b overflows
@@ -48,7 +48,7 @@ int test__addvti3(ti_int a, ti_int b)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
// should abort
// test__addvti3(make_ti(0x8000000000000000LL, 0x0000000000000000LL),
// make_ti(0xFFFFFFFFFFFFFFFFLL, 0xFFFFFFFFFFFFFFFFLL));
diff --git a/compiler-rt/test/builtins/Unit/ashlti3_test.c b/compiler-rt/test/builtins/Unit/ashlti3_test.c
index b9f4dcc0a8c..2361d16b369 100644
--- a/compiler-rt/test/builtins/Unit/ashlti3_test.c
+++ b/compiler-rt/test/builtins/Unit/ashlti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a << b
// Precondition: 0 <= b < bits_in_tword
@@ -49,7 +49,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ashlti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/ashrti3_test.c b/compiler-rt/test/builtins/Unit/ashrti3_test.c
index 3abee36b6b7..62ba1017ecd 100644
--- a/compiler-rt/test/builtins/Unit/ashrti3_test.c
+++ b/compiler-rt/test/builtins/Unit/ashrti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: arithmetic a >> b
// Precondition: 0 <= b < bits_in_tword
@@ -47,7 +47,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ashrti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/clzti2_test.c b/compiler-rt/test/builtins/Unit/clzti2_test.c
index d2ca1645dd1..5a0e3e8b1e9 100644
--- a/compiler-rt/test/builtins/Unit/clzti2_test.c
+++ b/compiler-rt/test/builtins/Unit/clzti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: the number of leading 0-bits
// Precondition: a != 0
@@ -41,7 +41,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
const int N = (int)(sizeof(ti_int) * CHAR_BIT);
if (test__clzti2(0x00000001, N-1))
diff --git a/compiler-rt/test/builtins/Unit/cmpti2_test.c b/compiler-rt/test/builtins/Unit/cmpti2_test.c
index 4339e0abb5e..15ee4fc68d5 100644
--- a/compiler-rt/test/builtins/Unit/cmpti2_test.c
+++ b/compiler-rt/test/builtins/Unit/cmpti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: if (a < b) returns 0
// if (a == b) returns 1
// if (a > b) returns 2
@@ -43,7 +43,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__cmpti2(0, 0, 1))
return 1;
if (test__cmpti2(1, 1, 1))
diff --git a/compiler-rt/test/builtins/Unit/ctzti2_test.c b/compiler-rt/test/builtins/Unit/ctzti2_test.c
index c4934bd254b..9a972f9e2f9 100644
--- a/compiler-rt/test/builtins/Unit/ctzti2_test.c
+++ b/compiler-rt/test/builtins/Unit/ctzti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: the number of trailing 0-bits
// Precondition: a != 0
@@ -41,7 +41,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ctzti2(0x00000001, 0))
return 1;
if (test__ctzti2(0x00000002, 1))
diff --git a/compiler-rt/test/builtins/Unit/divti3_test.c b/compiler-rt/test/builtins/Unit/divti3_test.c
index 7c8e2970fa6..bc81c2a5418 100644
--- a/compiler-rt/test/builtins/Unit/divti3_test.c
+++ b/compiler-rt/test/builtins/Unit/divti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a / b
ti_int __divti3(ti_int a, ti_int b);
@@ -47,7 +47,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__divti3(0, 1, 0))
return 1;
if (test__divti3(0, -1, 0))
diff --git a/compiler-rt/test/builtins/Unit/ffsti2_test.c b/compiler-rt/test/builtins/Unit/ffsti2_test.c
index fcb5c2725f2..f944ed0a1e4 100644
--- a/compiler-rt/test/builtins/Unit/ffsti2_test.c
+++ b/compiler-rt/test/builtins/Unit/ffsti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: the index of the least significant 1-bit in a, or
// the value zero if a is zero. The least significant bit is index one.
@@ -40,7 +40,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ffsti2(0x00000000, 0))
return 1;
if (test__ffsti2(0x00000001, 1))
diff --git a/compiler-rt/test/builtins/Unit/fixdfti_test.c b/compiler-rt/test/builtins/Unit/fixdfti_test.c
index 98a5628eddd..bfa88fd70e1 100644
--- a/compiler-rt/test/builtins/Unit/fixdfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixdfti_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a signed long long, rounding toward zero.
// Assumption: double is a IEEE 64 bit floating point type
@@ -49,7 +49,7 @@ char assumption_3[sizeof(double)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixdfti(0.0, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/fixsfti_test.c b/compiler-rt/test/builtins/Unit/fixsfti_test.c
index 5fdd0057852..2b0b9977481 100644
--- a/compiler-rt/test/builtins/Unit/fixsfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixsfti_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a signed long long, rounding toward zero.
// Assumption: float is a IEEE 32 bit floating point type
@@ -49,7 +49,7 @@ char assumption_3[sizeof(float)*CHAR_BIT == 32] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixsfti(0.0F, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/fixunsdfti_test.c b/compiler-rt/test/builtins/Unit/fixunsdfti_test.c
index 1e44b82660c..9f89de49368 100644
--- a/compiler-rt/test/builtins/Unit/fixunsdfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixunsdfti_test.c
@@ -24,7 +24,7 @@
// seee eeee eeee mmmm mmmm mmmm mmmm mmmm | mmmm mmmm mmmm mmmm mmmm mmmm mmmm mmmm
-#if __x86_64
+#ifdef CRT_HAS_128BIT
tu_int __fixunsdfti(double a);
@@ -51,7 +51,7 @@ char assumption_3[sizeof(double)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunsdfti(0.0, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/fixunssfti_test.c b/compiler-rt/test/builtins/Unit/fixunssfti_test.c
index cc5e44ba59e..7965b9500d0 100644
--- a/compiler-rt/test/builtins/Unit/fixunssfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixunssfti_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a unsigned long long, rounding toward zero.
// Negative values all become zero.
@@ -51,7 +51,7 @@ char assumption_3[sizeof(float)*CHAR_BIT == 32] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunssfti(0.0F, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/fixunsxfti_test.c b/compiler-rt/test/builtins/Unit/fixunsxfti_test.c
index 0e3c842bc02..7d18b1267b3 100644
--- a/compiler-rt/test/builtins/Unit/fixunsxfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixunsxfti_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a unsigned long long, rounding toward zero.
// Negative values all become zero.
@@ -52,7 +52,7 @@ char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunsxfti(0.0, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/fixxfti_test.c b/compiler-rt/test/builtins/Unit/fixxfti_test.c
index 11296b03687..87914c5341b 100644
--- a/compiler-rt/test/builtins/Unit/fixxfti_test.c
+++ b/compiler-rt/test/builtins/Unit/fixxfti_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a signed long long, rounding toward zero.
// Assumption: long double is an intel 80 bit floating point type padded with 6 bytes
@@ -50,7 +50,7 @@ char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixxfti(0.0, 0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floattidf_test.c b/compiler-rt/test/builtins/Unit/floattidf_test.c
index cfe40849960..476304f96f1 100644
--- a/compiler-rt/test/builtins/Unit/floattidf_test.c
+++ b/compiler-rt/test/builtins/Unit/floattidf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a double, rounding toward even.
// Assumption: double is a IEEE 64 bit floating point type
@@ -47,7 +47,7 @@ char assumption_3[sizeof(double)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattidf(0, 0.0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floattisf_test.c b/compiler-rt/test/builtins/Unit/floattisf_test.c
index a83ec63a25c..75b8e917f76 100644
--- a/compiler-rt/test/builtins/Unit/floattisf_test.c
+++ b/compiler-rt/test/builtins/Unit/floattisf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a float, rounding toward even.
// Assumption: float is a IEEE 32 bit floating point type
@@ -47,7 +47,7 @@ char assumption_3[sizeof(float)*CHAR_BIT == 32] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattisf(0, 0.0F))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floattixf_test.c b/compiler-rt/test/builtins/Unit/floattixf_test.c
index 4a9dfb56ac9..ce3566867a4 100644
--- a/compiler-rt/test/builtins/Unit/floattixf_test.c
+++ b/compiler-rt/test/builtins/Unit/floattixf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a long double, rounding toward even.
// Assumption: long double is a IEEE 80 bit floating point type padded to 128 bits
@@ -48,7 +48,7 @@ char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattixf(0, 0.0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floatuntidf_test.c b/compiler-rt/test/builtins/Unit/floatuntidf_test.c
index caad5d435e1..3cab027051c 100644
--- a/compiler-rt/test/builtins/Unit/floatuntidf_test.c
+++ b/compiler-rt/test/builtins/Unit/floatuntidf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a double, rounding toward even.
// Assumption: double is a IEEE 64 bit floating point type
@@ -47,7 +47,7 @@ char assumption_3[sizeof(double)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntidf(0, 0.0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floatuntisf_test.c b/compiler-rt/test/builtins/Unit/floatuntisf_test.c
index 85c0727ce13..aeac3ee41e5 100644
--- a/compiler-rt/test/builtins/Unit/floatuntisf_test.c
+++ b/compiler-rt/test/builtins/Unit/floatuntisf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a float, rounding toward even.
// Assumption: float is a IEEE 32 bit floating point type
@@ -47,7 +47,7 @@ char assumption_3[sizeof(float)*CHAR_BIT == 32] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntisf(0, 0.0F))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/floatuntixf_test.c b/compiler-rt/test/builtins/Unit/floatuntixf_test.c
index fc7531a9c82..9c3434fdde0 100644
--- a/compiler-rt/test/builtins/Unit/floatuntixf_test.c
+++ b/compiler-rt/test/builtins/Unit/floatuntixf_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <float.h>
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: convert a to a long double, rounding toward even.
// Assumption: long double is a IEEE 80 bit floating point type padded to 128 bits
@@ -48,7 +48,7 @@ char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntixf(0, 0.0))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/lshrti3_test.c b/compiler-rt/test/builtins/Unit/lshrti3_test.c
index f266b54f63c..3f33c089cd6 100644
--- a/compiler-rt/test/builtins/Unit/lshrti3_test.c
+++ b/compiler-rt/test/builtins/Unit/lshrti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: logical a >> b
// Precondition: 0 <= b < bits_in_dword
@@ -47,7 +47,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__lshrti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
diff --git a/compiler-rt/test/builtins/Unit/modti3_test.c b/compiler-rt/test/builtins/Unit/modti3_test.c
index bd05c7237d2..ba9f9804dfc 100644
--- a/compiler-rt/test/builtins/Unit/modti3_test.c
+++ b/compiler-rt/test/builtins/Unit/modti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a % b
ti_int __modti3(ti_int a, ti_int b);
@@ -47,7 +47,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__modti3(0, 1, 0))
return 1;
if (test__modti3(0, -1, 0))
diff --git a/compiler-rt/test/builtins/Unit/muloti4_test.c b/compiler-rt/test/builtins/Unit/muloti4_test.c
index 44abddf26ba..95439a4197a 100644
--- a/compiler-rt/test/builtins/Unit/muloti4_test.c
+++ b/compiler-rt/test/builtins/Unit/muloti4_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a * b
// Effects: sets overflow if a * b overflows
@@ -67,7 +67,7 @@ int test__muloti4(ti_int a, ti_int b, ti_int expected, int expected_overflow)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__muloti4(0, 0, 0, 0))
return 1;
if (test__muloti4(0, 1, 0, 0))
diff --git a/compiler-rt/test/builtins/Unit/multi3_test.c b/compiler-rt/test/builtins/Unit/multi3_test.c
index f8c6605eb25..2ccbd06c3e7 100644
--- a/compiler-rt/test/builtins/Unit/multi3_test.c
+++ b/compiler-rt/test/builtins/Unit/multi3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
ti_int __multi3(ti_int a, ti_int b);
int test__multi3(ti_int a, ti_int b, ti_int expected)
@@ -45,7 +45,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__multi3(0, 0, 0))
return 1;
if (test__multi3(0, 1, 0))
diff --git a/compiler-rt/test/builtins/Unit/mulvti3_test.c b/compiler-rt/test/builtins/Unit/mulvti3_test.c
index be1aa2d331c..6336f4550e0 100644
--- a/compiler-rt/test/builtins/Unit/mulvti3_test.c
+++ b/compiler-rt/test/builtins/Unit/mulvti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a * b
// Effects: aborts if a * b overflows
@@ -47,7 +47,7 @@ int test__mulvti3(ti_int a, ti_int b, ti_int expected)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__mulvti3(0, 0, 0))
return 1;
if (test__mulvti3(0, 1, 0))
diff --git a/compiler-rt/test/builtins/Unit/negti2_test.c b/compiler-rt/test/builtins/Unit/negti2_test.c
index 1945accfa95..a40c0c324bb 100644
--- a/compiler-rt/test/builtins/Unit/negti2_test.c
+++ b/compiler-rt/test/builtins/Unit/negti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: -a
ti_int __negti2(ti_int a);
@@ -44,7 +44,7 @@ char assumption_1[sizeof(ti_int) == 2*sizeof(di_int)] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__negti2(0, 0))
return 1;
if (test__negti2(1, -1))
diff --git a/compiler-rt/test/builtins/Unit/negvti2_test.c b/compiler-rt/test/builtins/Unit/negvti2_test.c
index 772840989ad..8126cdb5b66 100644
--- a/compiler-rt/test/builtins/Unit/negvti2_test.c
+++ b/compiler-rt/test/builtins/Unit/negvti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: -a
// Effects: aborts if -a overflows
@@ -46,7 +46,7 @@ int test__negvti2(ti_int a)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__negvti2(0))
return 1;
if (test__negvti2(1))
diff --git a/compiler-rt/test/builtins/Unit/parityti2_test.c b/compiler-rt/test/builtins/Unit/parityti2_test.c
index ac67b35669a..8f065b953d2 100644
--- a/compiler-rt/test/builtins/Unit/parityti2_test.c
+++ b/compiler-rt/test/builtins/Unit/parityti2_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: 1 if number of bits is odd else returns 0
si_int __parityti2(ti_int a);
@@ -50,7 +50,7 @@ char assumption_2[sizeof(di_int)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
int i;
for (i = 0; i < 10000; ++i)
if (test__parityti2(((ti_int)rand() << 96) + ((ti_int)rand() << 64) +
diff --git a/compiler-rt/test/builtins/Unit/popcountti2_test.c b/compiler-rt/test/builtins/Unit/popcountti2_test.c
index 1b94a0c6aa5..d17e03afd66 100644
--- a/compiler-rt/test/builtins/Unit/popcountti2_test.c
+++ b/compiler-rt/test/builtins/Unit/popcountti2_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: count of 1 bits
si_int __popcountti2(ti_int a);
@@ -50,7 +50,7 @@ char assumption_2[sizeof(di_int)*CHAR_BIT == 64] = {0};
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__popcountti2(0))
return 1;
if (test__popcountti2(1))
diff --git a/compiler-rt/test/builtins/Unit/subvti3_test.c b/compiler-rt/test/builtins/Unit/subvti3_test.c
index 6176bdfda97..b2c225c3a7f 100644
--- a/compiler-rt/test/builtins/Unit/subvti3_test.c
+++ b/compiler-rt/test/builtins/Unit/subvti3_test.c
@@ -11,12 +11,12 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
#include <stdlib.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a - b
// Effects: aborts if a - b overflows
@@ -49,7 +49,7 @@ int test__subvti3(ti_int a, ti_int b)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
// test__subvti3(make_ti(0x8000000000000000LL, 0), 1); // should abort
// test__subvti3(0, make_ti(0x8000000000000000LL, 0)); // should abort
// test__subvti3(1, make_ti(0x8000000000000000LL, 0)); // should abort
diff --git a/compiler-rt/test/builtins/Unit/ucmpti2_test.c b/compiler-rt/test/builtins/Unit/ucmpti2_test.c
index 55f820b89f2..0713da8971a 100644
--- a/compiler-rt/test/builtins/Unit/ucmpti2_test.c
+++ b/compiler-rt/test/builtins/Unit/ucmpti2_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: if (a < b) returns 0
// if (a == b) returns 1
// if (a > b) returns 2
@@ -42,7 +42,7 @@ int test__ucmpti2(tu_int a, tu_int b, si_int expected)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ucmpti2(0, 0, 1))
return 1;
if (test__ucmpti2(1, 1, 1))
diff --git a/compiler-rt/test/builtins/Unit/udivmodti4_test.c b/compiler-rt/test/builtins/Unit/udivmodti4_test.c
index e0cae35ea7a..751aa868325 100644
--- a/compiler-rt/test/builtins/Unit/udivmodti4_test.c
+++ b/compiler-rt/test/builtins/Unit/udivmodti4_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Effects: if rem != 0, *rem = a % b
// Returns: a / b
@@ -65339,7 +65339,7 @@ tu_int tests[][4] =
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
const unsigned N = sizeof(tests) / sizeof(tests[0]);
unsigned i;
for (i = 0; i < N; ++i)
diff --git a/compiler-rt/test/builtins/Unit/udivti3_test.c b/compiler-rt/test/builtins/Unit/udivti3_test.c
index 09e0e1cf70d..af5aad9a391 100644
--- a/compiler-rt/test/builtins/Unit/udivti3_test.c
+++ b/compiler-rt/test/builtins/Unit/udivti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a / b
tu_int __udivti3(tu_int a, tu_int b);
@@ -45,7 +45,7 @@ int test__udivti3(tu_int a, tu_int b, tu_int expected_q)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__udivti3(0, 1, 0))
return 1;
if (test__udivti3(2, 1, 2))
diff --git a/compiler-rt/test/builtins/Unit/umodti3_test.c b/compiler-rt/test/builtins/Unit/umodti3_test.c
index 5eac2d834fb..93b556ccaa2 100644
--- a/compiler-rt/test/builtins/Unit/umodti3_test.c
+++ b/compiler-rt/test/builtins/Unit/umodti3_test.c
@@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
-#if __x86_64
-
#include "int_lib.h"
#include <stdio.h>
+#ifdef CRT_HAS_128BIT
+
// Returns: a % b
tu_int __umodti3(tu_int a, tu_int b);
@@ -45,7 +45,7 @@ int test__umodti3(tu_int a, tu_int b, tu_int expected_r)
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__umodti3(0, 1, 0))
return 1;
if (test__umodti3(2, 1, 0))
OpenPOWER on IntegriCloud