linux-omap 2.6.39: sync with meta-texasinstruments
[openembedded.git] / recipes / glibc / files / ppc-ld-nofpu-20070104.patch
blobd5b1d31774eba21729520dd2b290a227f99a63a0
1 2007-01-12 Steven Munroe <sjmunroe@us.ibm.com>
2 Joe Kerian <jkerian@us.us.ibm.com>
4 [BZ #2749]
5 * sysdeps/ieee754/ldbl-128ibm/s_copysignl.c:
6 Include <math_ldbl_opt.h>.
7 Remove weak_alias. Use long_double_symbol macro.
8 (__copysignl): Use signbit() for comparison.
9 * sysdeps/ieee754/ldbl-128ibm/s_fabsl.c: Correct parms for
10 SET_LDOUBLE_WORDS64.
12 [BZ #2423, #2749]
13 * sysdeps/ieee754/ldbl-128ibm/s_ceill.c: Don't include <fenv_libc.h>.
14 (__ceill): Remove calls to fegetround(), fesetround().
15 * sysdeps/ieee754/ldbl-128ibm/s_floorl.c: Likewise.
16 * sysdeps/ieee754/ldbl-128ibm/s_roundl.c: Likewise.
17 * sysdeps/ieee754/ldbl-128ibm/s_truncl.c: Likewise.
19 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_ceill.c libc24/sysdeps/ieee754/ldbl-128ibm/s_ceill.c
20 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2006-03-16 05:46:37.000000000 -0600
21 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_ceill.c 2007-01-11 10:30:12.856890432 -0600
22 @@ -19,7 +19,6 @@
23 02111-1307 USA. */
25 #include <math.h>
26 -#include <fenv_libc.h>
27 #include <math_ldbl_opt.h>
28 #include <float.h>
29 #include <ieee754.h>
30 @@ -44,11 +43,9 @@
31 __builtin_inf ()), 1))
33 double orig_xh;
34 - int save_round = fegetround ();
36 /* Long double arithmetic, including the canonicalisation below,
37 only works in round-to-nearest mode. */
38 - fesetround (FE_TONEAREST);
40 /* Convert the high double to integer. */
41 orig_xh = xh;
42 @@ -81,8 +78,6 @@
43 /* Ensure we return -0 rather than +0 when appropriate. */
44 if (orig_xh < 0.0)
45 xh = -__builtin_fabs (xh);
47 - fesetround (save_round);
50 return ldbl_pack (xh, xl);
51 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c
52 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c 2006-01-27 18:07:25.000000000 -0600
53 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_copysignl.c 2007-01-11 10:30:12.857890280 -0600
54 @@ -25,6 +25,7 @@
56 #include "math.h"
57 #include "math_private.h"
58 +#include <math_ldbl_opt.h>
60 #ifdef __STDC__
61 long double __copysignl(long double x, long double y)
62 @@ -33,13 +34,13 @@
63 long double x,y;
64 #endif
66 - if (y < 0.0)
67 - {
68 - if (x >= 0.0)
69 - x = -x;
70 - }
71 - else if (x < 0.0)
72 + if( signbit(x) != signbit(y) )
73 x = -x;
74 return x;
76 -weak_alias (__copysignl, copysignl)
78 +#ifdef IS_IN_libm
79 +long_double_symbol (libm, __copysignl, copysignl);
80 +#else
81 +long_double_symbol (libc, __copysignl, copysignl);
82 +#endif
83 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c
84 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2006-01-27 18:07:25.000000000 -0600
85 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_fabsl.c 2007-01-11 10:30:12.857890280 -0600
86 @@ -37,7 +37,7 @@
87 GET_LDOUBLE_WORDS64(hx,lx,x);
88 lx = lx ^ ( hx & 0x8000000000000000LL );
89 hx = hx & 0x7fffffffffffffffLL;
90 - SET_LDOUBLE_WORDS64(hx,lx,x);
91 + SET_LDOUBLE_WORDS64(x,hx,lx);
92 return x;
94 long_double_symbol (libm, __fabsl, fabsl);
95 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_floorl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_floorl.c
96 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2006-03-16 05:46:37.000000000 -0600
97 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_floorl.c 2007-01-11 10:30:12.858890128 -0600
98 @@ -19,7 +19,6 @@
99 02111-1307 USA. */
101 #include <math.h>
102 -#include <fenv_libc.h>
103 #include <math_ldbl_opt.h>
104 #include <float.h>
105 #include <ieee754.h>
106 @@ -43,11 +42,8 @@
107 && __builtin_isless (__builtin_fabs (xh),
108 __builtin_inf ()), 1))
110 - int save_round = fegetround ();
112 /* Long double arithmetic, including the canonicalisation below,
113 only works in round-to-nearest mode. */
114 - fesetround (FE_TONEAREST);
116 /* Convert the high double to integer. */
117 hi = ldbl_nearbyint (xh);
118 @@ -75,8 +71,6 @@
119 xh = hi;
120 xl = lo;
121 ldbl_canonicalize (&xh, &xl);
123 - fesetround (save_round);
126 return ldbl_pack (xh, xl);
127 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_roundl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_roundl.c
128 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2006-03-16 05:46:37.000000000 -0600
129 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_roundl.c 2007-01-11 10:30:12.859889976 -0600
130 @@ -22,7 +22,6 @@
131 when it's coded in C. */
133 #include <math.h>
134 -#include <fenv_libc.h>
135 #include <math_ldbl_opt.h>
136 #include <float.h>
137 #include <ieee754.h>
138 @@ -47,11 +46,9 @@
139 __builtin_inf ()), 1))
141 double orig_xh;
142 - int save_round = fegetround ();
144 /* Long double arithmetic, including the canonicalisation below,
145 only works in round-to-nearest mode. */
146 - fesetround (FE_TONEAREST);
148 /* Convert the high double to integer. */
149 orig_xh = xh;
150 @@ -88,8 +85,6 @@
151 xh = hi;
152 xl = lo;
153 ldbl_canonicalize (&xh, &xl);
155 - fesetround (save_round);
158 return ldbl_pack (xh, xl);
159 diff -urN libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_truncl.c libc24/sysdeps/ieee754/ldbl-128ibm/s_truncl.c
160 --- libc25-cvstip-20070104/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2006-03-16 05:46:37.000000000 -0600
161 +++ libc24/sysdeps/ieee754/ldbl-128ibm/s_truncl.c 2007-01-11 10:30:12.860889824 -0600
162 @@ -22,7 +22,6 @@
163 when it's coded in C. */
165 #include <math.h>
166 -#include <fenv_libc.h>
167 #include <math_ldbl_opt.h>
168 #include <float.h>
169 #include <ieee754.h>
170 @@ -47,11 +46,9 @@
171 __builtin_inf ()), 1))
173 double orig_xh;
174 - int save_round = fegetround ();
176 /* Long double arithmetic, including the canonicalisation below,
177 only works in round-to-nearest mode. */
178 - fesetround (FE_TONEAREST);
180 /* Convert the high double to integer. */
181 orig_xh = xh;
182 @@ -92,8 +89,6 @@
183 /* Ensure we return -0 rather than +0 when appropriate. */
184 if (orig_xh < 0.0)
185 xh = -__builtin_fabs (xh);
187 - fesetround (save_round);
190 return ldbl_pack (xh, xl);