diff gcc/config/pa/quadlib.c @ 14:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents a06113de4d67
children
line wrap: on
line diff
--- a/gcc/config/pa/quadlib.c	Tue May 25 18:58:51 2010 +0900
+++ b/gcc/config/pa/quadlib.c	Tue Mar 22 17:18:12 2011 +0900
@@ -58,6 +58,7 @@
 int _U_Qfcomp (long double, long double);
 
 long double _U_Qfneg (long double);
+long double _U_Qfcopysign (long double, long double);
 
 #ifdef __LP64__
 int __U_Qfcnvfxt_quad_to_sgl (long double);
@@ -160,7 +161,6 @@
   return (_U_Qfcmp (a, b, QCMP_UNORD | QCMP_EQ | QCMP_GT) != 0 ? 1 : -1);
 }
 
-
 /* Negate long double A.  */
 long double
 _U_Qfneg (long double a)
@@ -176,6 +176,23 @@
   return u.ld;
 }
 
+/* Return long double A with sign changed to sign of long double B.  */
+long double
+_U_Qfcopysign (long double a, long double b)
+{
+  union
+   {
+     long double ld;
+     int i[4];
+   } ua, ub;
+
+  ua.ld = a;
+  ub.ld = b;
+  ua.i[0] &= 0x7fffffff;
+  ua.i[0] |= (0x80000000 & ub.i[0]);
+  return ua.ld;
+}
+
 #ifdef __LP64__
 /* This routine is only necessary for the PA64 port; for reasons unknown
    _U_Qfcnvfxt_quad_to_sgl returns the integer in the high 32bits of the