diff options
Diffstat (limited to 'meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch')
-rw-r--r-- | meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch | 365 |
1 files changed, 365 insertions, 0 deletions
diff --git a/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch new file mode 100644 index 0000000000..5b819bc458 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/ppc_slow_ieee754_sqrt.patch | |||
@@ -0,0 +1,365 @@ | |||
1 | __ieee754_sqrt{,f} are now inline functions and call out __slow versions | ||
2 | |||
3 | |||
4 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
5 | Upstream-Status: Pending | ||
6 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
7 | =================================================================== | ||
8 | --- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
9 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | ||
10 | @@ -40,7 +40,7 @@ | ||
11 | simultaneously. */ | ||
12 | |||
13 | double | ||
14 | -__ieee754_sqrt (double b) | ||
15 | +__slow_ieee754_sqrt (double b) | ||
16 | { | ||
17 | if (__builtin_expect (b > 0, 1)) | ||
18 | { | ||
19 | @@ -77,7 +77,7 @@ | ||
20 | |||
21 | /* Handle small numbers by scaling. */ | ||
22 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
23 | - return __ieee754_sqrt (b * two108) * twom54; | ||
24 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
25 | |||
26 | #define FMADD(a_, c_, b_) \ | ||
27 | ({ double __r; \ | ||
28 | @@ -126,4 +126,12 @@ | ||
29 | } | ||
30 | return f_wash (b); | ||
31 | } | ||
32 | + | ||
33 | +#undef __ieee754_sqrt | ||
34 | +double | ||
35 | +__ieee754_sqrt (double x) | ||
36 | +{ | ||
37 | + return __slow_ieee754_sqrt (x); | ||
38 | +} | ||
39 | + | ||
40 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
41 | Index: git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
42 | =================================================================== | ||
43 | --- git.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
44 | +++ git/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | ||
45 | @@ -38,7 +38,7 @@ | ||
46 | square root. */ | ||
47 | |||
48 | float | ||
49 | -__ieee754_sqrtf (float b) | ||
50 | +__slow_ieee754_sqrtf (float b) | ||
51 | { | ||
52 | if (__builtin_expect (b > 0, 1)) | ||
53 | { | ||
54 | @@ -93,4 +93,10 @@ | ||
55 | } | ||
56 | return f_washf (b); | ||
57 | } | ||
58 | +#undef __ieee754_sqrtf | ||
59 | +float | ||
60 | +__ieee754_sqrtf (float x) | ||
61 | +{ | ||
62 | + return __slow_ieee754_sqrtf (x); | ||
63 | +} | ||
64 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
65 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
66 | =================================================================== | ||
67 | --- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
68 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | ||
69 | @@ -40,7 +40,7 @@ | ||
70 | simultaneously. */ | ||
71 | |||
72 | double | ||
73 | -__ieee754_sqrt (double b) | ||
74 | +__slow_ieee754_sqrt (double b) | ||
75 | { | ||
76 | if (__builtin_expect (b > 0, 1)) | ||
77 | { | ||
78 | @@ -77,7 +77,7 @@ | ||
79 | |||
80 | /* Handle small numbers by scaling. */ | ||
81 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
82 | - return __ieee754_sqrt (b * two108) * twom54; | ||
83 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
84 | |||
85 | #define FMADD(a_, c_, b_) \ | ||
86 | ({ double __r; \ | ||
87 | @@ -126,4 +126,12 @@ | ||
88 | } | ||
89 | return f_wash (b); | ||
90 | } | ||
91 | + | ||
92 | +#undef __ieee754_sqrt | ||
93 | +double | ||
94 | +__ieee754_sqrt (double x) | ||
95 | +{ | ||
96 | + return __slow_ieee754_sqrt (x); | ||
97 | +} | ||
98 | + | ||
99 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
100 | Index: git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
101 | =================================================================== | ||
102 | --- git.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
103 | +++ git/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | ||
104 | @@ -38,7 +38,7 @@ | ||
105 | square root. */ | ||
106 | |||
107 | float | ||
108 | -__ieee754_sqrtf (float b) | ||
109 | +__slow_ieee754_sqrtf (float b) | ||
110 | { | ||
111 | if (__builtin_expect (b > 0, 1)) | ||
112 | { | ||
113 | @@ -93,4 +93,11 @@ | ||
114 | } | ||
115 | return f_washf (b); | ||
116 | } | ||
117 | +#undef __ieee754_sqrtf | ||
118 | +float | ||
119 | +__ieee754_sqrtf (float x) | ||
120 | +{ | ||
121 | + return __slow_ieee754_sqrtf (x); | ||
122 | +} | ||
123 | + | ||
124 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
125 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
126 | =================================================================== | ||
127 | --- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
128 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.604070587 -0700 | ||
129 | @@ -41,10 +41,10 @@ | ||
130 | |||
131 | #ifdef __STDC__ | ||
132 | double | ||
133 | -__ieee754_sqrt (double b) | ||
134 | +__slow_ieee754_sqrt (double b) | ||
135 | #else | ||
136 | double | ||
137 | -__ieee754_sqrt (b) | ||
138 | +__slow_ieee754_sqrt (b) | ||
139 | double b; | ||
140 | #endif | ||
141 | { | ||
142 | @@ -83,7 +83,7 @@ | ||
143 | |||
144 | /* Handle small numbers by scaling. */ | ||
145 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
146 | - return __ieee754_sqrt (b * two108) * twom54; | ||
147 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
148 | |||
149 | #define FMADD(a_, c_, b_) \ | ||
150 | ({ double __r; \ | ||
151 | @@ -132,4 +132,12 @@ | ||
152 | } | ||
153 | return f_wash (b); | ||
154 | } | ||
155 | + | ||
156 | +#undef __ieee754_sqrt | ||
157 | +double | ||
158 | +__ieee754_sqrt (double x) | ||
159 | +{ | ||
160 | + return __slow_ieee754_sqrt (x); | ||
161 | +} | ||
162 | + | ||
163 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
164 | Index: git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
165 | =================================================================== | ||
166 | --- git.orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
167 | +++ git/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.604070587 -0700 | ||
168 | @@ -39,10 +39,10 @@ | ||
169 | |||
170 | #ifdef __STDC__ | ||
171 | float | ||
172 | -__ieee754_sqrtf (float b) | ||
173 | +__slow_ieee754_sqrtf (float b) | ||
174 | #else | ||
175 | float | ||
176 | -__ieee754_sqrtf (b) | ||
177 | +__slow_ieee754_sqrtf (b) | ||
178 | float b; | ||
179 | #endif | ||
180 | { | ||
181 | @@ -99,4 +99,12 @@ | ||
182 | } | ||
183 | return f_washf (b); | ||
184 | } | ||
185 | + | ||
186 | +#undef __ieee754_sqrtf | ||
187 | +float | ||
188 | +__ieee754_sqrtf (float x) | ||
189 | +{ | ||
190 | + return __slow_ieee754_sqrtf (x); | ||
191 | +} | ||
192 | + | ||
193 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
194 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
195 | =================================================================== | ||
196 | --- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
197 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | ||
198 | @@ -41,10 +41,10 @@ | ||
199 | |||
200 | #ifdef __STDC__ | ||
201 | double | ||
202 | -__ieee754_sqrt (double b) | ||
203 | +__slow_ieee754_sqrt (double b) | ||
204 | #else | ||
205 | double | ||
206 | -__ieee754_sqrt (b) | ||
207 | +__slow_ieee754_sqrt (b) | ||
208 | double b; | ||
209 | #endif | ||
210 | { | ||
211 | @@ -83,7 +83,7 @@ | ||
212 | |||
213 | /* Handle small numbers by scaling. */ | ||
214 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
215 | - return __ieee754_sqrt (b * two108) * twom54; | ||
216 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
217 | |||
218 | #define FMADD(a_, c_, b_) \ | ||
219 | ({ double __r; \ | ||
220 | @@ -132,4 +132,12 @@ | ||
221 | } | ||
222 | return f_wash (b); | ||
223 | } | ||
224 | + | ||
225 | +#undef __ieee754_sqrt | ||
226 | +double | ||
227 | +__ieee754_sqrt (double x) | ||
228 | +{ | ||
229 | + return __slow_ieee754_sqrt (x); | ||
230 | +} | ||
231 | + | ||
232 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
233 | Index: git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
234 | =================================================================== | ||
235 | --- git.orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
236 | +++ git/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | ||
237 | @@ -39,10 +39,10 @@ | ||
238 | |||
239 | #ifdef __STDC__ | ||
240 | float | ||
241 | -__ieee754_sqrtf (float b) | ||
242 | +__slow_ieee754_sqrtf (float b) | ||
243 | #else | ||
244 | float | ||
245 | -__ieee754_sqrtf (b) | ||
246 | +__slow_ieee754_sqrtf (b) | ||
247 | float b; | ||
248 | #endif | ||
249 | { | ||
250 | @@ -99,4 +99,12 @@ | ||
251 | } | ||
252 | return f_washf (b); | ||
253 | } | ||
254 | + | ||
255 | +#undef __ieee754_sqrtf | ||
256 | +float | ||
257 | +__ieee754_sqrtf (float x) | ||
258 | +{ | ||
259 | + return __slow_ieee754_sqrtf (x); | ||
260 | +} | ||
261 | + | ||
262 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
263 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
264 | =================================================================== | ||
265 | --- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
266 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | ||
267 | @@ -41,10 +41,10 @@ | ||
268 | |||
269 | #ifdef __STDC__ | ||
270 | double | ||
271 | -__ieee754_sqrt (double b) | ||
272 | +__slow_ieee754_sqrt (double b) | ||
273 | #else | ||
274 | double | ||
275 | -__ieee754_sqrt (b) | ||
276 | +__slow_ieee754_sqrt (b) | ||
277 | double b; | ||
278 | #endif | ||
279 | { | ||
280 | @@ -83,7 +83,7 @@ | ||
281 | |||
282 | /* Handle small numbers by scaling. */ | ||
283 | if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | ||
284 | - return __ieee754_sqrt (b * two108) * twom54; | ||
285 | + return __slow_ieee754_sqrt (b * two108) * twom54; | ||
286 | |||
287 | #define FMADD(a_, c_, b_) \ | ||
288 | ({ double __r; \ | ||
289 | @@ -132,4 +132,12 @@ | ||
290 | } | ||
291 | return f_wash (b); | ||
292 | } | ||
293 | + | ||
294 | +#undef __ieee754_sqrt | ||
295 | +double | ||
296 | +__ieee754_sqrt (double x) | ||
297 | +{ | ||
298 | + return __slow_ieee754_sqrt (x); | ||
299 | +} | ||
300 | + | ||
301 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
302 | Index: git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
303 | =================================================================== | ||
304 | --- git.orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
305 | +++ git/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | ||
306 | @@ -39,10 +39,10 @@ | ||
307 | |||
308 | #ifdef __STDC__ | ||
309 | float | ||
310 | -__ieee754_sqrtf (float b) | ||
311 | +__slow_ieee754_sqrtf (float b) | ||
312 | #else | ||
313 | float | ||
314 | -__ieee754_sqrtf (b) | ||
315 | +__slow_ieee754_sqrtf (b) | ||
316 | float b; | ||
317 | #endif | ||
318 | { | ||
319 | @@ -99,4 +99,12 @@ | ||
320 | } | ||
321 | return f_washf (b); | ||
322 | } | ||
323 | + | ||
324 | +#undef __ieee754_sqrtf | ||
325 | +float | ||
326 | +__ieee754_sqrtf (float x) | ||
327 | +{ | ||
328 | + return __slow_ieee754_sqrtf (x); | ||
329 | +} | ||
330 | + | ||
331 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||
332 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
333 | =================================================================== | ||
334 | --- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.616070587 -0700 | ||
335 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2014-08-29 10:35:02.608070587 -0700 | ||
336 | @@ -132,4 +132,12 @@ | ||
337 | } | ||
338 | return f_wash (b); | ||
339 | } | ||
340 | + | ||
341 | +#undef __ieee754_sqrt | ||
342 | +double | ||
343 | +__ieee754_sqrt (double x) | ||
344 | +{ | ||
345 | + return __slow_ieee754_sqrt (x); | ||
346 | +} | ||
347 | + | ||
348 | strong_alias (__ieee754_sqrt, __sqrt_finite) | ||
349 | Index: git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
350 | =================================================================== | ||
351 | --- git.orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.616070587 -0700 | ||
352 | +++ git/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2014-08-29 10:35:02.608070587 -0700 | ||
353 | @@ -99,4 +99,12 @@ | ||
354 | } | ||
355 | return f_washf (b); | ||
356 | } | ||
357 | + | ||
358 | +#undef __ieee754_sqrtf | ||
359 | +float | ||
360 | +__ieee754_sqrtf (float x) | ||
361 | +{ | ||
362 | + return __slow_ieee754_sqrtf (x); | ||
363 | +} | ||
364 | + | ||
365 | strong_alias (__ieee754_sqrtf, __sqrtf_finite) | ||