Commit 4a6c754b by Alan Modra Committed by Alan Modra

re PR target/25960 (__gcc_qadd doesn't handle -0.0L properly)

	PR target/25960
gcc/
	* config/rs6000/darwin-ldouble.c (__gcc_qadd): Preserve -0.0 result.
gcc/testsuite/
	* gcc.target/powerpc/pr25960.c: New test.

From-SVN: r110540
parent f61a2c7d
2006-02-03 Alan Modra <amodra@bigpond.net.au>
PR target/25960
* config/rs6000/darwin-ldouble.c (__gcc_qadd): Preserve -0.0 result.
2006-02-03 Andreas Krebbel <krebbel1@de.ibm.com> 2006-02-03 Andreas Krebbel <krebbel1@de.ibm.com>
Ulrich Weigand <uweigand@de.ibm.com> Ulrich Weigand <uweigand@de.ibm.com>
...@@ -1544,6 +1549,7 @@ ...@@ -1544,6 +1549,7 @@
2006-01-20 Alan Modra <amodra@bigpond.net.au> 2006-01-20 Alan Modra <amodra@bigpond.net.au>
PR target/25668
* libgcc2.c (__floatdisf, __floatdidf): Don't use IBM Extended * libgcc2.c (__floatdisf, __floatdidf): Don't use IBM Extended
Double TFmode. Double TFmode.
(__floatundisf, __floatundidf): Likewise. (__floatundisf, __floatundidf): Likewise.
......
...@@ -117,8 +117,12 @@ __gcc_qadd (double a, double aa, double c, double cc) ...@@ -117,8 +117,12 @@ __gcc_qadd (double a, double aa, double c, double cc)
{ {
q = a - z; q = a - z;
zz = q + c + (a - (q + z)) + aa + cc; zz = q + c + (a - (q + z)) + aa + cc;
xh = z + zz;
/* Keep -0 result. */
if (zz == 0.0)
return z;
xh = z + zz;
if (nonfinite (xh)) if (nonfinite (xh))
return xh; return xh;
......
2006-02-03 Alan Modra <amodra@bigpond.net.au>
* gcc.target/powerpc/pr25960.c: New test.
2006-02-02 Steven G. Kargl <kargls@comcast> 2006-02-02 Steven G. Kargl <kargls@comcast>
PR fortran/24958 PR fortran/24958
/* { dg-do run { target { powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* powerpc*-*-linux* } } } */
/* { dg-options "-O2 -mlong-double-128" } */
extern void abort (void);
volatile long double l, m, n;
int
main (void)
{
l = __builtin_copysignl (0.0L, -1.0L);
m = __builtin_copysignl (0.0L, -1.0L);
n = l + m;
if (__builtin_copysignl (1.0L, n) >= 0.0L)
abort ();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment