comparison 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
comparison
equal deleted inserted replaced
13:65488c3d617d 14:f6334be47118
56 int _U_Qford (long double, long double); 56 int _U_Qford (long double, long double);
57 57
58 int _U_Qfcomp (long double, long double); 58 int _U_Qfcomp (long double, long double);
59 59
60 long double _U_Qfneg (long double); 60 long double _U_Qfneg (long double);
61 long double _U_Qfcopysign (long double, long double);
61 62
62 #ifdef __LP64__ 63 #ifdef __LP64__
63 int __U_Qfcnvfxt_quad_to_sgl (long double); 64 int __U_Qfcnvfxt_quad_to_sgl (long double);
64 #endif 65 #endif
65 unsigned int _U_Qfcnvfxt_quad_to_usgl(long double); 66 unsigned int _U_Qfcnvfxt_quad_to_usgl(long double);
158 return 0; 159 return 0;
159 160
160 return (_U_Qfcmp (a, b, QCMP_UNORD | QCMP_EQ | QCMP_GT) != 0 ? 1 : -1); 161 return (_U_Qfcmp (a, b, QCMP_UNORD | QCMP_EQ | QCMP_GT) != 0 ? 1 : -1);
161 } 162 }
162 163
163
164 /* Negate long double A. */ 164 /* Negate long double A. */
165 long double 165 long double
166 _U_Qfneg (long double a) 166 _U_Qfneg (long double a)
167 { 167 {
168 union 168 union
174 u.ld = a; 174 u.ld = a;
175 u.i[0] ^= 0x80000000; 175 u.i[0] ^= 0x80000000;
176 return u.ld; 176 return u.ld;
177 } 177 }
178 178
179 /* Return long double A with sign changed to sign of long double B. */
180 long double
181 _U_Qfcopysign (long double a, long double b)
182 {
183 union
184 {
185 long double ld;
186 int i[4];
187 } ua, ub;
188
189 ua.ld = a;
190 ub.ld = b;
191 ua.i[0] &= 0x7fffffff;
192 ua.i[0] |= (0x80000000 & ub.i[0]);
193 return ua.ld;
194 }
195
179 #ifdef __LP64__ 196 #ifdef __LP64__
180 /* This routine is only necessary for the PA64 port; for reasons unknown 197 /* This routine is only necessary for the PA64 port; for reasons unknown
181 _U_Qfcnvfxt_quad_to_sgl returns the integer in the high 32bits of the 198 _U_Qfcnvfxt_quad_to_sgl returns the integer in the high 32bits of the
182 return value. Ugh. */ 199 return value. Ugh. */
183 int 200 int