summaryrefslogtreecommitdiff
path: root/test/builtins/Unit
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2014-03-18 21:35:30 +0000
committerJoerg Sonnenberger <joerg@bec.de>2014-03-18 21:35:30 +0000
commit111c0b708ec2e6d3cb70a7a8d877ce36e68642fa (patch)
tree1ce5c137768ce4179e918afd6434df58ba10c4d9 /test/builtins/Unit
parente65df207ef73bf915d4e57564b62193fce988196 (diff)
downloadcompiler-rt-111c0b708ec2e6d3cb70a7a8d877ce36e68642fa.tar.gz
Use CRT_HAS_128BIT.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204182 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/builtins/Unit')
-rw-r--r--test/builtins/Unit/absvti2_test.c6
-rw-r--r--test/builtins/Unit/addvti3_test.c6
-rw-r--r--test/builtins/Unit/ashlti3_test.c6
-rw-r--r--test/builtins/Unit/ashrti3_test.c6
-rw-r--r--test/builtins/Unit/clzti2_test.c6
-rw-r--r--test/builtins/Unit/cmpti2_test.c6
-rw-r--r--test/builtins/Unit/ctzti2_test.c6
-rw-r--r--test/builtins/Unit/divti3_test.c6
-rw-r--r--test/builtins/Unit/ffsti2_test.c6
-rw-r--r--test/builtins/Unit/fixdfti_test.c6
-rw-r--r--test/builtins/Unit/fixsfti_test.c6
-rw-r--r--test/builtins/Unit/fixunsdfti_test.c4
-rw-r--r--test/builtins/Unit/fixunssfti_test.c6
-rw-r--r--test/builtins/Unit/fixunsxfti_test.c6
-rw-r--r--test/builtins/Unit/fixxfti_test.c6
-rw-r--r--test/builtins/Unit/floattidf_test.c6
-rw-r--r--test/builtins/Unit/floattisf_test.c6
-rw-r--r--test/builtins/Unit/floattixf_test.c6
-rw-r--r--test/builtins/Unit/floatuntidf_test.c6
-rw-r--r--test/builtins/Unit/floatuntisf_test.c6
-rw-r--r--test/builtins/Unit/floatuntixf_test.c6
-rw-r--r--test/builtins/Unit/lshrti3_test.c6
-rw-r--r--test/builtins/Unit/modti3_test.c6
-rw-r--r--test/builtins/Unit/muloti4_test.c6
-rw-r--r--test/builtins/Unit/multi3_test.c6
-rw-r--r--test/builtins/Unit/mulvti3_test.c6
-rw-r--r--test/builtins/Unit/negti2_test.c6
-rw-r--r--test/builtins/Unit/negvti2_test.c6
-rw-r--r--test/builtins/Unit/parityti2_test.c6
-rw-r--r--test/builtins/Unit/popcountti2_test.c6
-rw-r--r--test/builtins/Unit/subvti3_test.c6
-rw-r--r--test/builtins/Unit/ucmpti2_test.c6
-rw-r--r--test/builtins/Unit/udivmodti4_test.c6
-rw-r--r--test/builtins/Unit/udivti3_test.c6
-rw-r--r--test/builtins/Unit/umodti3_test.c6
35 files changed, 104 insertions, 104 deletions
diff --git a/test/builtins/Unit/absvti2_test.c b/test/builtins/Unit/absvti2_test.c
index 8233c18ff..9b71f200a 100644
--- a/test/builtins/Unit/absvti2_test.c
+++ b/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/test/builtins/Unit/addvti3_test.c b/test/builtins/Unit/addvti3_test.c
index 1cf066c48..fe093e3b2 100644
--- a/test/builtins/Unit/addvti3_test.c
+++ b/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/test/builtins/Unit/ashlti3_test.c b/test/builtins/Unit/ashlti3_test.c
index b9f4dcc0a..2361d16b3 100644
--- a/test/builtins/Unit/ashlti3_test.c
+++ b/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/test/builtins/Unit/ashrti3_test.c b/test/builtins/Unit/ashrti3_test.c
index 3abee36b6..62ba1017e 100644
--- a/test/builtins/Unit/ashrti3_test.c
+++ b/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/test/builtins/Unit/clzti2_test.c b/test/builtins/Unit/clzti2_test.c
index d2ca1645d..5a0e3e8b1 100644
--- a/test/builtins/Unit/clzti2_test.c
+++ b/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/test/builtins/Unit/cmpti2_test.c b/test/builtins/Unit/cmpti2_test.c
index 4339e0abb..15ee4fc68 100644
--- a/test/builtins/Unit/cmpti2_test.c
+++ b/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/test/builtins/Unit/ctzti2_test.c b/test/builtins/Unit/ctzti2_test.c
index c4934bd25..9a972f9e2 100644
--- a/test/builtins/Unit/ctzti2_test.c
+++ b/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/test/builtins/Unit/divti3_test.c b/test/builtins/Unit/divti3_test.c
index 7c8e2970f..bc81c2a54 100644
--- a/test/builtins/Unit/divti3_test.c
+++ b/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/test/builtins/Unit/ffsti2_test.c b/test/builtins/Unit/ffsti2_test.c
index fcb5c2725..f944ed0a1 100644
--- a/test/builtins/Unit/ffsti2_test.c
+++ b/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/test/builtins/Unit/fixdfti_test.c b/test/builtins/Unit/fixdfti_test.c
index 98a5628ed..bfa88fd70 100644
--- a/test/builtins/Unit/fixdfti_test.c
+++ b/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/test/builtins/Unit/fixsfti_test.c b/test/builtins/Unit/fixsfti_test.c
index 5fdd00578..2b0b99774 100644
--- a/test/builtins/Unit/fixsfti_test.c
+++ b/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/test/builtins/Unit/fixunsdfti_test.c b/test/builtins/Unit/fixunsdfti_test.c
index 1e44b8266..9f89de493 100644
--- a/test/builtins/Unit/fixunsdfti_test.c
+++ b/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/test/builtins/Unit/fixunssfti_test.c b/test/builtins/Unit/fixunssfti_test.c
index cc5e44ba5..7965b9500 100644
--- a/test/builtins/Unit/fixunssfti_test.c
+++ b/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/test/builtins/Unit/fixunsxfti_test.c b/test/builtins/Unit/fixunsxfti_test.c
index 0e3c842bc..7d18b1267 100644
--- a/test/builtins/Unit/fixunsxfti_test.c
+++ b/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/test/builtins/Unit/fixxfti_test.c b/test/builtins/Unit/fixxfti_test.c
index 11296b036..87914c534 100644
--- a/test/builtins/Unit/fixxfti_test.c
+++ b/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/test/builtins/Unit/floattidf_test.c b/test/builtins/Unit/floattidf_test.c
index cfe408499..476304f96 100644
--- a/test/builtins/Unit/floattidf_test.c
+++ b/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/test/builtins/Unit/floattisf_test.c b/test/builtins/Unit/floattisf_test.c
index a83ec63a2..75b8e917f 100644
--- a/test/builtins/Unit/floattisf_test.c
+++ b/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/test/builtins/Unit/floattixf_test.c b/test/builtins/Unit/floattixf_test.c
index 4a9dfb56a..ce3566867 100644
--- a/test/builtins/Unit/floattixf_test.c
+++ b/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/test/builtins/Unit/floatuntidf_test.c b/test/builtins/Unit/floatuntidf_test.c
index caad5d435..3cab02705 100644
--- a/test/builtins/Unit/floatuntidf_test.c
+++ b/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/test/builtins/Unit/floatuntisf_test.c b/test/builtins/Unit/floatuntisf_test.c
index 85c0727ce..aeac3ee41 100644
--- a/test/builtins/Unit/floatuntisf_test.c
+++ b/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/test/builtins/Unit/floatuntixf_test.c b/test/builtins/Unit/floatuntixf_test.c
index fc7531a9c..9c3434fdd 100644
--- a/test/builtins/Unit/floatuntixf_test.c
+++ b/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/test/builtins/Unit/lshrti3_test.c b/test/builtins/Unit/lshrti3_test.c
index f266b54f6..3f33c089c 100644
--- a/test/builtins/Unit/lshrti3_test.c
+++ b/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/test/builtins/Unit/modti3_test.c b/test/builtins/Unit/modti3_test.c
index bd05c7237..ba9f9804d 100644
--- a/test/builtins/Unit/modti3_test.c
+++ b/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/test/builtins/Unit/muloti4_test.c b/test/builtins/Unit/muloti4_test.c
index 44abddf26..95439a419 100644
--- a/test/builtins/Unit/muloti4_test.c
+++ b/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/test/builtins/Unit/multi3_test.c b/test/builtins/Unit/multi3_test.c
index f8c6605eb..2ccbd06c3 100644
--- a/test/builtins/Unit/multi3_test.c
+++ b/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/test/builtins/Unit/mulvti3_test.c b/test/builtins/Unit/mulvti3_test.c
index be1aa2d33..6336f4550 100644
--- a/test/builtins/Unit/mulvti3_test.c
+++ b/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/test/builtins/Unit/negti2_test.c b/test/builtins/Unit/negti2_test.c
index 1945accfa..a40c0c324 100644
--- a/test/builtins/Unit/negti2_test.c
+++ b/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/test/builtins/Unit/negvti2_test.c b/test/builtins/Unit/negvti2_test.c
index 772840989..8126cdb5b 100644
--- a/test/builtins/Unit/negvti2_test.c
+++ b/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/test/builtins/Unit/parityti2_test.c b/test/builtins/Unit/parityti2_test.c
index ac67b3566..8f065b953 100644
--- a/test/builtins/Unit/parityti2_test.c
+++ b/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/test/builtins/Unit/popcountti2_test.c b/test/builtins/Unit/popcountti2_test.c
index 1b94a0c6a..d17e03afd 100644
--- a/test/builtins/Unit/popcountti2_test.c
+++ b/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/test/builtins/Unit/subvti3_test.c b/test/builtins/Unit/subvti3_test.c
index 6176bdfda..b2c225c3a 100644
--- a/test/builtins/Unit/subvti3_test.c
+++ b/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/test/builtins/Unit/ucmpti2_test.c b/test/builtins/Unit/ucmpti2_test.c
index 55f820b89..0713da897 100644
--- a/test/builtins/Unit/ucmpti2_test.c
+++ b/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/test/builtins/Unit/udivmodti4_test.c b/test/builtins/Unit/udivmodti4_test.c
index e0cae35ea..751aa8683 100644
--- a/test/builtins/Unit/udivmodti4_test.c
+++ b/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/test/builtins/Unit/udivti3_test.c b/test/builtins/Unit/udivti3_test.c
index 09e0e1cf7..af5aad9a3 100644
--- a/test/builtins/Unit/udivti3_test.c
+++ b/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/test/builtins/Unit/umodti3_test.c b/test/builtins/Unit/umodti3_test.c
index 5eac2d834..93b556cca 100644
--- a/test/builtins/Unit/umodti3_test.c
+++ b/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))