use HAS_80_BIT_LONG_DOUBLE so some tests work properly on arm

llvm-svn: 81552
This commit is contained in:
Nick Kledzik 2009-09-11 19:09:36 +00:00
parent 31e48cdb5d
commit 7e71865ca5
6 changed files with 21 additions and 20 deletions

View File

@ -11,11 +11,12 @@
//
//===----------------------------------------------------------------------===//
#if !_ARCH_PPC
#include "int_lib.h"
#include <stdio.h>
#include <limits.h>
#if HAS_80_BIT_LONG_DOUBLE
// Returns: convert a to a unsigned long long, rounding toward zero.
// Negative values all become zero.
@ -41,12 +42,11 @@ int test__fixunsxfdi(long double a, du_int expected)
char assumption_1[sizeof(du_int) == 2*sizeof(su_int)] = {0};
char assumption_2[sizeof(du_int)*CHAR_BIT == 64] = {0};
char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
#endif
int main()
{
#if !_ARCH_PPC
#if HAS_80_BIT_LONG_DOUBLE
if (test__fixunsxfdi(0.0, 0))
return 1;

View File

@ -11,11 +11,10 @@
//
//===----------------------------------------------------------------------===//
#if !_ARCH_PPC
#include "int_lib.h"
#include <stdio.h>
#if HAS_80_BIT_LONG_DOUBLE
// Returns: convert a to a unsigned int, rounding toward zero.
// Negative values all become zero.
@ -39,12 +38,11 @@ int test__fixunsxfsi(long double a, su_int expected)
char assumption_2[sizeof(su_int)*CHAR_BIT == 32] = {0};
char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
#endif
int main()
{
#if !_ARCH_PPC
#if HAS_80_BIT_LONG_DOUBLE
if (test__fixunsxfsi(0.0, 0))
return 1;

View File

@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
#if !_ARCH_PPC
#include "int_lib.h"
#include <stdio.h>
#if HAS_80_BIT_LONG_DOUBLE
// 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
@ -39,12 +39,11 @@ int test__fixxfdi(long double a, di_int expected)
char assumption_1[sizeof(di_int) == 2*sizeof(si_int)] = {0};
char assumption_2[sizeof(su_int)*CHAR_BIT == 32] = {0};
char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
#endif
int main()
{
#if !_ARCH_PPC
#if HAS_80_BIT_LONG_DOUBLE
if (test__fixxfdi(0.0, 0))
return 1;

View File

@ -11,11 +11,10 @@
//
//===----------------------------------------------------------------------===//
#if !_ARCH_PPC
#include "int_lib.h"
#include <stdio.h>
#if HAS_80_BIT_LONG_DOUBLE
// 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
@ -38,12 +37,11 @@ int test__floatdixf(di_int a, long double expected)
char assumption_1[sizeof(di_int) == 2*sizeof(si_int)] = {0};
char assumption_2[sizeof(di_int)*CHAR_BIT == 64] = {0};
char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
#endif
int main()
{
#if !_ARCH_PPC
#if HAS_80_BIT_LONG_DOUBLE
if (test__floatdixf(0, 0.0))
return 1;

View File

@ -11,11 +11,11 @@
//
//===----------------------------------------------------------------------===//
#if !_ARCH_PPC
#include "int_lib.h"
#include <stdio.h>
#if HAS_80_BIT_LONG_DOUBLE
// 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
@ -38,12 +38,11 @@ int test__floatundixf(du_int a, long double expected)
char assumption_1[sizeof(du_int) == 2*sizeof(si_int)] = {0};
char assumption_2[sizeof(du_int)*CHAR_BIT == 64] = {0};
char assumption_3[sizeof(long double)*CHAR_BIT == 128] = {0};
#endif
int main()
{
#if !_ARCH_PPC
#if HAS_80_BIT_LONG_DOUBLE
if (test__floatundixf(0, 0.0))
return 1;

View File

@ -149,4 +149,11 @@ typedef union
long double f;
} long_double_bits;
/* for test cases that are only applicable to */
/* architectures with 80-bit long doubles */
#if __i386__ || __x86_64__
#define HAS_80_BIT_LONG_DOUBLE 1
#endif
#endif /* INT_LIB_H */