[compiler-rt] r204182 - Use CRT_HAS_128BIT.
Joerg Sonnenberger
joerg at bec.de
Tue Mar 18 14:35:31 PDT 2014
Author: joerg
Date: Tue Mar 18 16:35:30 2014
New Revision: 204182
URL: http://llvm.org/viewvc/llvm-project?rev=204182&view=rev
Log:
Use CRT_HAS_128BIT.
Modified:
compiler-rt/trunk/test/builtins/Unit/absvti2_test.c
compiler-rt/trunk/test/builtins/Unit/addvti3_test.c
compiler-rt/trunk/test/builtins/Unit/ashlti3_test.c
compiler-rt/trunk/test/builtins/Unit/ashrti3_test.c
compiler-rt/trunk/test/builtins/Unit/clzti2_test.c
compiler-rt/trunk/test/builtins/Unit/cmpti2_test.c
compiler-rt/trunk/test/builtins/Unit/ctzti2_test.c
compiler-rt/trunk/test/builtins/Unit/divti3_test.c
compiler-rt/trunk/test/builtins/Unit/ffsti2_test.c
compiler-rt/trunk/test/builtins/Unit/fixdfti_test.c
compiler-rt/trunk/test/builtins/Unit/fixsfti_test.c
compiler-rt/trunk/test/builtins/Unit/fixunsdfti_test.c
compiler-rt/trunk/test/builtins/Unit/fixunssfti_test.c
compiler-rt/trunk/test/builtins/Unit/fixunsxfti_test.c
compiler-rt/trunk/test/builtins/Unit/fixxfti_test.c
compiler-rt/trunk/test/builtins/Unit/floattidf_test.c
compiler-rt/trunk/test/builtins/Unit/floattisf_test.c
compiler-rt/trunk/test/builtins/Unit/floattixf_test.c
compiler-rt/trunk/test/builtins/Unit/floatuntidf_test.c
compiler-rt/trunk/test/builtins/Unit/floatuntisf_test.c
compiler-rt/trunk/test/builtins/Unit/floatuntixf_test.c
compiler-rt/trunk/test/builtins/Unit/lshrti3_test.c
compiler-rt/trunk/test/builtins/Unit/modti3_test.c
compiler-rt/trunk/test/builtins/Unit/muloti4_test.c
compiler-rt/trunk/test/builtins/Unit/multi3_test.c
compiler-rt/trunk/test/builtins/Unit/mulvti3_test.c
compiler-rt/trunk/test/builtins/Unit/negti2_test.c
compiler-rt/trunk/test/builtins/Unit/negvti2_test.c
compiler-rt/trunk/test/builtins/Unit/parityti2_test.c
compiler-rt/trunk/test/builtins/Unit/popcountti2_test.c
compiler-rt/trunk/test/builtins/Unit/subvti3_test.c
compiler-rt/trunk/test/builtins/Unit/ucmpti2_test.c
compiler-rt/trunk/test/builtins/Unit/udivmodti4_test.c
compiler-rt/trunk/test/builtins/Unit/udivti3_test.c
compiler-rt/trunk/test/builtins/Unit/umodti3_test.c
Modified: compiler-rt/trunk/test/builtins/Unit/absvti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/absvti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/absvti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/absvti2_test.c Tue Mar 18 16:35:30 2014
@@ -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;
Modified: compiler-rt/trunk/test/builtins/Unit/addvti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/addvti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/addvti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/addvti3_test.c Tue Mar 18 16:35:30 2014
@@ -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));
Modified: compiler-rt/trunk/test/builtins/Unit/ashlti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/ashlti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/ashlti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/ashlti3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ashlti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/ashrti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/ashrti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/ashrti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/ashrti3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ashrti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/clzti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/clzti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/clzti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/clzti2_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
const int N = (int)(sizeof(ti_int) * CHAR_BIT);
if (test__clzti2(0x00000001, N-1))
Modified: compiler-rt/trunk/test/builtins/Unit/cmpti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/cmpti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/cmpti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/cmpti2_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__cmpti2(0, 0, 1))
return 1;
if (test__cmpti2(1, 1, 1))
Modified: compiler-rt/trunk/test/builtins/Unit/ctzti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/ctzti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/ctzti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/ctzti2_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ctzti2(0x00000001, 0))
return 1;
if (test__ctzti2(0x00000002, 1))
Modified: compiler-rt/trunk/test/builtins/Unit/divti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/divti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/divti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/divti3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__divti3(0, 1, 0))
return 1;
if (test__divti3(0, -1, 0))
Modified: compiler-rt/trunk/test/builtins/Unit/ffsti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/ffsti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/ffsti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/ffsti2_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ffsti2(0x00000000, 0))
return 1;
if (test__ffsti2(0x00000001, 1))
Modified: compiler-rt/trunk/test/builtins/Unit/fixdfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixdfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixdfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixdfti_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixdfti(0.0, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/fixsfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixsfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixsfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixsfti_test.c Tue Mar 18 16:35:30 2014
@@ -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
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixsfti(0.0F, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/fixunsdfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixunsdfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixunsdfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixunsdfti_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunsdfti(0.0, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/fixunssfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixunssfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixunssfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixunssfti_test.c Tue Mar 18 16:35:30 2014
@@ -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
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunssfti(0.0F, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/fixunsxfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixunsxfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixunsxfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixunsxfti_test.c Tue Mar 18 16:35:30 2014
@@ -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)*CH
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixunsxfti(0.0, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/fixxfti_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/fixxfti_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/fixxfti_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/fixxfti_test.c Tue Mar 18 16:35:30 2014
@@ -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)*CH
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__fixxfti(0.0, 0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floattidf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floattidf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floattidf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floattidf_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattidf(0, 0.0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floattisf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floattisf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floattisf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floattisf_test.c Tue Mar 18 16:35:30 2014
@@ -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
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattisf(0, 0.0F))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floattixf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floattixf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floattixf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floattixf_test.c Tue Mar 18 16:35:30 2014
@@ -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)*CH
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floattixf(0, 0.0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floatuntidf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floatuntidf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floatuntidf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floatuntidf_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntidf(0, 0.0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floatuntisf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floatuntisf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floatuntisf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floatuntisf_test.c Tue Mar 18 16:35:30 2014
@@ -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
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntisf(0, 0.0F))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/floatuntixf_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/floatuntixf_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/floatuntixf_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/floatuntixf_test.c Tue Mar 18 16:35:30 2014
@@ -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)*CH
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__floatuntixf(0, 0.0))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/lshrti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/lshrti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/lshrti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/lshrti3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__lshrti3(make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL), 0,
make_ti(0xFEDCBA9876543215LL, 0xFEDCBA9876543215LL)))
return 1;
Modified: compiler-rt/trunk/test/builtins/Unit/modti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/modti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/modti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/modti3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__modti3(0, 1, 0))
return 1;
if (test__modti3(0, -1, 0))
Modified: compiler-rt/trunk/test/builtins/Unit/muloti4_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/muloti4_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/muloti4_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/muloti4_test.c Tue Mar 18 16:35:30 2014
@@ -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 main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__muloti4(0, 0, 0, 0))
return 1;
if (test__muloti4(0, 1, 0, 0))
Modified: compiler-rt/trunk/test/builtins/Unit/multi3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/multi3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/multi3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/multi3_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__multi3(0, 0, 0))
return 1;
if (test__multi3(0, 1, 0))
Modified: compiler-rt/trunk/test/builtins/Unit/mulvti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/mulvti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/mulvti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/mulvti3_test.c Tue Mar 18 16:35:30 2014
@@ -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 main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__mulvti3(0, 0, 0))
return 1;
if (test__mulvti3(0, 1, 0))
Modified: compiler-rt/trunk/test/builtins/Unit/negti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/negti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/negti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/negti2_test.c Tue Mar 18 16:35:30 2014
@@ -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*si
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__negti2(0, 0))
return 1;
if (test__negti2(1, -1))
Modified: compiler-rt/trunk/test/builtins/Unit/negvti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/negvti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/negvti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/negvti2_test.c Tue Mar 18 16:35:30 2014
@@ -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))
Modified: compiler-rt/trunk/test/builtins/Unit/parityti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/parityti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/parityti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/parityti2_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
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) +
Modified: compiler-rt/trunk/test/builtins/Unit/popcountti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/popcountti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/popcountti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/popcountti2_test.c Tue Mar 18 16:35:30 2014
@@ -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_BI
int main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__popcountti2(0))
return 1;
if (test__popcountti2(1))
Modified: compiler-rt/trunk/test/builtins/Unit/subvti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/subvti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/subvti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/subvti3_test.c Tue Mar 18 16:35:30 2014
@@ -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
Modified: compiler-rt/trunk/test/builtins/Unit/ucmpti2_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/ucmpti2_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/ucmpti2_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/ucmpti2_test.c Tue Mar 18 16:35:30 2014
@@ -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 main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__ucmpti2(0, 0, 1))
return 1;
if (test__ucmpti2(1, 1, 1))
Modified: compiler-rt/trunk/test/builtins/Unit/udivmodti4_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/udivmodti4_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/udivmodti4_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/udivmodti4_test.c Tue Mar 18 16:35:30 2014
@@ -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)
Modified: compiler-rt/trunk/test/builtins/Unit/udivti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/udivti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/udivti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/udivti3_test.c Tue Mar 18 16:35:30 2014
@@ -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 main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__udivti3(0, 1, 0))
return 1;
if (test__udivti3(2, 1, 2))
Modified: compiler-rt/trunk/test/builtins/Unit/umodti3_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/builtins/Unit/umodti3_test.c?rev=204182&r1=204181&r2=204182&view=diff
==============================================================================
--- compiler-rt/trunk/test/builtins/Unit/umodti3_test.c (original)
+++ compiler-rt/trunk/test/builtins/Unit/umodti3_test.c Tue Mar 18 16:35:30 2014
@@ -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 main()
{
-#if __x86_64
+#ifdef CRT_HAS_128BIT
if (test__umodti3(0, 1, 0))
return 1;
if (test__umodti3(2, 1, 0))
More information about the llvm-commits
mailing list