2012-09-25 Igor Zamyatin <igor.zamyatin@intel.com>
* gcc.target/i386/
20030217-1.c: Added check for
large_long_double effective target.
* gcc.target/i386/387-3.c: Likewise.
* gcc.target/i386/387-4.c: Likewise.
* gcc.target/i386/pr36578-1.c: Likewise.
* gcc.target/i386/excess-precision-1.c: Added new code for the case
when long double size is equal double size.
* gcc.target/i386/excess-precision-1.c: Likewise.
* gcc.target/i386/pr36578-2.c: Likewise.
* gcc.target/i386/
20030217-2.c: New testcase.
From-SVN: r191704
+2012-09-25 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ * gcc.target/i386/20030217-1.c: Added check for
+ large_long_double effective target.
+ * gcc.target/i386/387-3.c: Likewise.
+ * gcc.target/i386/387-4.c: Likewise.
+ * gcc.target/i386/pr36578-1.c: Likewise.
+ * gcc.target/i386/excess-precision-1.c: Added new code for the case
+ when long double size is equal double size.
+ * gcc.target/i386/excess-precision-1.c: Likewise.
+ * gcc.target/i386/pr36578-2.c: Likewise.
+ * gcc.target/i386/20030217-2.c: New testcase.
+
2012-09-25 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54676
are parsed correctly. */
/* { dg-do run } */
/* { dg-options "-std=c99" } */
+/* { dg-require-effective-target large_long_double } */
long double d = 0x0.0000003ffffffff00000p-16357L;
long double e = 0x0.0000003ffffffff00000p-16356L;
/* { dg-do compile } */
/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
/* { dg-final { scan-assembler "fldpi" } } */
+/* { dg-require-effective-target large_long_double } */
long double add_pi(long double x)
{
/* { dg-do compile } */
/* { dg-options "-O2 -mfancy-math-387" } */
/* { dg-final { scan-assembler "fldpi" } } */
+/* { dg-require-effective-target large_long_double } */
long double atanl (long double);
abort ();
if (f1 + f2 < fadd1)
abort ();
- if (d1 + d2 + d3 == dadd2)
- abort ();
- if (!(d1 + d2 + d3 > dadd2))
- abort ();
- if (!(d1 + d2 + d3 >= dadd2))
- abort ();
+ if (sizeof(long double) > sizeof(double)) {
+ if ( d1 + d2 + d3 == dadd2)
+ abort ();
+ if (!(d1 + d2 + d3 > dadd2))
+ abort ();
+ if (!(d1 + d2 + d3 >= dadd2))
+ abort ();
+ }
+ else {
+ if ( d1 + d2 + d3 != dadd2 )
+ abort();
+ if ( d1 + d2 + d3 < dadd2 )
+ abort();
+ if ( d1 + d2 + d3 > dadd2 )
+ abort();
+ }
}
volatile long double ldsub1 = 1.0l - 0x1.0p-30l;
abort ();
if ((0, dbl_min * dbl_min * dbl_min) != dbl_min3)
abort ();
- if (dbl_min * dbl_min * dbl_min == 0)
- abort ();
- if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 0) == 0)
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ if (dbl_min * dbl_min * dbl_min == 0)
+ abort ();
+ if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 0) == 0)
+ abort ();
+ }
+ else {
+ if (dbl_min * dbl_min * dbl_min != 0)
+ abort ();
+ if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 1) != 0)
+ abort ();
+ }
if ((flt_min * flt_min ? : 0) == 0)
abort ();
}
volatile double d1 = 1.0;
volatile double d2 = 0x1.0p-30;
volatile double d3 = 0x1.0p-60;
+volatile double d3d = 0x1.0p-52;
volatile float fadd1 = 1.0f + 0x1.0p-30f;
volatile double dadd2 = 1.0 + 0x1.0p-30 + 0x1.0p-60;
volatile double dh = 0x1.0p-24;
if (d != dadd2)
abort ();
/* Verify rounding direct to float without double rounding. */
- f = d1 + dh + d3;
- if (f != fha)
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ f = d1 + dh + d3;
+ if (f != fha)
+ abort ();
+ } else {
+ f = d1 + dh + d3d;
+ if (f != fha)
+ abort ();
+ }
}
void
abort ();
if (!__builtin_islessgreater (flt_min * flt_min, 0.0f))
abort ();
- if (!__builtin_isgreater (dbl_min * dbl_min, 0.0))
- abort ();
if (!__builtin_isgreaterequal (dbl_min * dbl_min, 0.0))
abort ();
- if (!__builtin_isless (0.0, dbl_min * dbl_min))
- abort ();
- if (__builtin_islessequal (dbl_min * dbl_min, 0.0))
- abort ();
- if (!__builtin_islessgreater (dbl_min * dbl_min, 0.0))
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ if (!__builtin_isgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (!__builtin_isless (0.0, dbl_min * dbl_min))
+ abort ();
+ if (__builtin_islessequal (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (!__builtin_islessgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ }
+ else {
+ if (__builtin_isgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (__builtin_isless (0.0, dbl_min * dbl_min))
+ abort ();
+ if (!__builtin_islessequal (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (__builtin_islessgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ }
}
int
/* { dg-do run } */
/* { dg-options "-msse2 -mfpmath=sse" } */
/* { dg-require-effective-target sse2 } */
+/* { dg-require-effective-target large_long_double } */
#include "sse2-check.h"
volatile double d1 = 0x1.000001p0;
volatile double d2 = 0x1p-54;
+volatile double d2d = 0x1p-52;
volatile float f = 0x1.000002p0f;
volatile float f2;
static void
sse2_test (void)
{
- f2 = (float)((long double)d1 + (long double)d2);
+ if (sizeof(long double) > sizeof(double) ) {
+ f2 = (float)((long double)d1 + (long double)d2);
+ } else {
+ f2 = (float)((long double)d1 + (long double)d2d);
+ }
if (f != f2)
abort ();
exit (0);