diff options
author | Khem Raj <raj.khem@gmail.com> | 2014-03-10 15:51:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-11 08:11:40 -0700 |
commit | b130d75c037c3d458817711221a86aa74903b509 (patch) | |
tree | 21bd34063fb1c668a699cf4ade05b3ffdef50bc6 /meta/recipes-core | |
parent | a511b2554d09298cae1381b454b9d00981ca8692 (diff) | |
download | poky-b130d75c037c3d458817711221a86aa74903b509.tar.gz |
eglibc: Fix build for FSL ppc/fpu
The patch needs to adapt to upstream changes
should fix errors on e500mc+ based SOCs
This should fix [YOCTO #5871]
(From OE-Core rev: 6235cc3ccf98dce15ffe3313cf4e6cdf9c922bce)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch | 162 |
1 files changed, 90 insertions, 72 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch b/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch index a66972998c..037feeb534 100644 --- a/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch +++ b/meta/recipes-core/eglibc/eglibc-2.19/glibc.fix_sqrt2.patch | |||
@@ -1,9 +1,10 @@ | |||
1 | Signed-of-by: Edmar Wienskoski <edmar@freescale.com> | 1 | Signed-of-by: Edmar Wienskoski <edmar@freescale.com> |
2 | Upstream-Status: Pending | 2 | Upstream-Status: Pending |
3 | 3 | ||
4 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | 4 | Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c |
5 | --- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 5 | =================================================================== |
6 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 | 6 | --- /dev/null |
7 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c | ||
7 | @@ -0,0 +1,134 @@ | 8 | @@ -0,0 +1,134 @@ |
8 | +/* Double-precision floating point square root. | 9 | +/* Double-precision floating point square root. |
9 | + Copyright (C) 2010 Free Software Foundation, Inc. | 10 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -87,7 +88,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/pow | |||
87 | + | 88 | + |
88 | + g = b * y; | 89 | + g = b * y; |
89 | + h = 0.5 * y; | 90 | + h = 0.5 * y; |
90 | + | 91 | + |
91 | + /* Handle small numbers by scaling. */ | 92 | + /* Handle small numbers by scaling. */ |
92 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 93 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
93 | + return __ieee754_sqrt (b * two108) * twom54; | 94 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -132,16 +133,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c libc/sysdeps/pow | |||
132 | + feraiseexcept (FE_INVALID_SQRT); | 133 | + feraiseexcept (FE_INVALID_SQRT); |
133 | + | 134 | + |
134 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 135 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
135 | + if ((u.l[1] & FE_INVALID) == 0) | 136 | + if ((u.l & FE_INVALID) == 0) |
136 | +#endif | 137 | +#endif |
137 | + feraiseexcept (FE_INVALID); | 138 | + feraiseexcept (FE_INVALID); |
138 | + b = a_nan.value; | 139 | + b = a_nan.value; |
139 | + } | 140 | + } |
140 | + return f_wash (b); | 141 | + return f_wash (b); |
141 | +} | 142 | +} |
142 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | 143 | Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c |
143 | --- libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 144 | =================================================================== |
144 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 | 145 | --- /dev/null |
146 | +++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c | ||
145 | @@ -0,0 +1,101 @@ | 147 | @@ -0,0 +1,101 @@ |
146 | +/* Single-precision floating point square root. | 148 | +/* Single-precision floating point square root. |
147 | + Copyright (C) 2010 Free Software Foundation, Inc. | 149 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -237,16 +239,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c libc/sysdeps/po | |||
237 | + feraiseexcept (FE_INVALID_SQRT); | 239 | + feraiseexcept (FE_INVALID_SQRT); |
238 | + | 240 | + |
239 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 241 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
240 | + if ((u.l[1] & FE_INVALID) == 0) | 242 | + if ((u.l & FE_INVALID) == 0) |
241 | +#endif | 243 | +#endif |
242 | + feraiseexcept (FE_INVALID); | 244 | + feraiseexcept (FE_INVALID); |
243 | + b = a_nan.value; | 245 | + b = a_nan.value; |
244 | + } | 246 | + } |
245 | + return f_washf (b); | 247 | + return f_washf (b); |
246 | +} | 248 | +} |
247 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | 249 | Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c |
248 | --- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 250 | =================================================================== |
249 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c 2012-06-14 14:55:14.749001061 -0500 | 251 | --- /dev/null |
252 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c | ||
250 | @@ -0,0 +1,134 @@ | 253 | @@ -0,0 +1,134 @@ |
251 | +/* Double-precision floating point square root. | 254 | +/* Double-precision floating point square root. |
252 | + Copyright (C) 2010 Free Software Foundation, Inc. | 255 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -330,7 +333,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/p | |||
330 | + | 333 | + |
331 | + g = b * y; | 334 | + g = b * y; |
332 | + h = 0.5 * y; | 335 | + h = 0.5 * y; |
333 | + | 336 | + |
334 | + /* Handle small numbers by scaling. */ | 337 | + /* Handle small numbers by scaling. */ |
335 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 338 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
336 | + return __ieee754_sqrt (b * two108) * twom54; | 339 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -375,16 +378,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrt.c libc/sysdeps/p | |||
375 | + feraiseexcept (FE_INVALID_SQRT); | 378 | + feraiseexcept (FE_INVALID_SQRT); |
376 | + | 379 | + |
377 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 380 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
378 | + if ((u.l[1] & FE_INVALID) == 0) | 381 | + if ((u.l & FE_INVALID) == 0) |
379 | +#endif | 382 | +#endif |
380 | + feraiseexcept (FE_INVALID); | 383 | + feraiseexcept (FE_INVALID); |
381 | + b = a_nan.value; | 384 | + b = a_nan.value; |
382 | + } | 385 | + } |
383 | + return f_wash (b); | 386 | + return f_wash (b); |
384 | +} | 387 | +} |
385 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | 388 | Index: libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c |
386 | --- libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 389 | =================================================================== |
387 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c 2012-06-14 14:55:14.749001061 -0500 | 390 | --- /dev/null |
391 | +++ libc/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c | ||
388 | @@ -0,0 +1,101 @@ | 392 | @@ -0,0 +1,101 @@ |
389 | +/* Single-precision floating point square root. | 393 | +/* Single-precision floating point square root. |
390 | + Copyright (C) 2010 Free Software Foundation, Inc. | 394 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -480,16 +484,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e500mc/fpu/e_sqrtf.c libc/sysdeps/ | |||
480 | + feraiseexcept (FE_INVALID_SQRT); | 484 | + feraiseexcept (FE_INVALID_SQRT); |
481 | + | 485 | + |
482 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 486 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
483 | + if ((u.l[1] & FE_INVALID) == 0) | 487 | + if ((u.l & FE_INVALID) == 0) |
484 | +#endif | 488 | +#endif |
485 | + feraiseexcept (FE_INVALID); | 489 | + feraiseexcept (FE_INVALID); |
486 | + b = a_nan.value; | 490 | + b = a_nan.value; |
487 | + } | 491 | + } |
488 | + return f_washf (b); | 492 | + return f_washf (b); |
489 | +} | 493 | +} |
490 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | 494 | Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c |
491 | --- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 495 | =================================================================== |
492 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c 2012-06-14 14:55:21.812002270 -0500 | 496 | --- /dev/null |
497 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c | ||
493 | @@ -0,0 +1,134 @@ | 498 | @@ -0,0 +1,134 @@ |
494 | +/* Double-precision floating point square root. | 499 | +/* Double-precision floating point square root. |
495 | + Copyright (C) 2010 Free Software Foundation, Inc. | 500 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -573,7 +578,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/po | |||
573 | + | 578 | + |
574 | + g = b * y; | 579 | + g = b * y; |
575 | + h = 0.5 * y; | 580 | + h = 0.5 * y; |
576 | + | 581 | + |
577 | + /* Handle small numbers by scaling. */ | 582 | + /* Handle small numbers by scaling. */ |
578 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 583 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
579 | + return __ieee754_sqrt (b * two108) * twom54; | 584 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -618,16 +623,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrt.c libc/sysdeps/po | |||
618 | + feraiseexcept (FE_INVALID_SQRT); | 623 | + feraiseexcept (FE_INVALID_SQRT); |
619 | + | 624 | + |
620 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 625 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
621 | + if ((u.l[1] & FE_INVALID) == 0) | 626 | + if ((u.l & FE_INVALID) == 0) |
622 | +#endif | 627 | +#endif |
623 | + feraiseexcept (FE_INVALID); | 628 | + feraiseexcept (FE_INVALID); |
624 | + b = a_nan.value; | 629 | + b = a_nan.value; |
625 | + } | 630 | + } |
626 | + return f_wash (b); | 631 | + return f_wash (b); |
627 | +} | 632 | +} |
628 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | 633 | Index: libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c |
629 | --- libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 634 | =================================================================== |
630 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c 2012-06-14 14:55:21.812002270 -0500 | 635 | --- /dev/null |
636 | +++ libc/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c | ||
631 | @@ -0,0 +1,101 @@ | 637 | @@ -0,0 +1,101 @@ |
632 | +/* Single-precision floating point square root. | 638 | +/* Single-precision floating point square root. |
633 | + Copyright (C) 2010 Free Software Foundation, Inc. | 639 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -723,16 +729,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e5500/fpu/e_sqrtf.c libc/sysdeps/p | |||
723 | + feraiseexcept (FE_INVALID_SQRT); | 729 | + feraiseexcept (FE_INVALID_SQRT); |
724 | + | 730 | + |
725 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 731 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
726 | + if ((u.l[1] & FE_INVALID) == 0) | 732 | + if ((u.l & FE_INVALID) == 0) |
727 | +#endif | 733 | +#endif |
728 | + feraiseexcept (FE_INVALID); | 734 | + feraiseexcept (FE_INVALID); |
729 | + b = a_nan.value; | 735 | + b = a_nan.value; |
730 | + } | 736 | + } |
731 | + return f_washf (b); | 737 | + return f_washf (b); |
732 | +} | 738 | +} |
733 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | 739 | Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c |
734 | --- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 740 | =================================================================== |
735 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c 2012-06-14 14:55:24.620001266 -0500 | 741 | --- /dev/null |
742 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c | ||
736 | @@ -0,0 +1,134 @@ | 743 | @@ -0,0 +1,134 @@ |
737 | +/* Double-precision floating point square root. | 744 | +/* Double-precision floating point square root. |
738 | + Copyright (C) 2010 Free Software Foundation, Inc. | 745 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -816,7 +823,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/po | |||
816 | + | 823 | + |
817 | + g = b * y; | 824 | + g = b * y; |
818 | + h = 0.5 * y; | 825 | + h = 0.5 * y; |
819 | + | 826 | + |
820 | + /* Handle small numbers by scaling. */ | 827 | + /* Handle small numbers by scaling. */ |
821 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 828 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
822 | + return __ieee754_sqrt (b * two108) * twom54; | 829 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -861,16 +868,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrt.c libc/sysdeps/po | |||
861 | + feraiseexcept (FE_INVALID_SQRT); | 868 | + feraiseexcept (FE_INVALID_SQRT); |
862 | + | 869 | + |
863 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 870 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
864 | + if ((u.l[1] & FE_INVALID) == 0) | 871 | + if ((u.l & FE_INVALID) == 0) |
865 | +#endif | 872 | +#endif |
866 | + feraiseexcept (FE_INVALID); | 873 | + feraiseexcept (FE_INVALID); |
867 | + b = a_nan.value; | 874 | + b = a_nan.value; |
868 | + } | 875 | + } |
869 | + return f_wash (b); | 876 | + return f_wash (b); |
870 | +} | 877 | +} |
871 | diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | 878 | Index: libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c |
872 | --- libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 879 | =================================================================== |
873 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c 2012-06-14 14:55:24.620001266 -0500 | 880 | --- /dev/null |
881 | +++ libc/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c | ||
874 | @@ -0,0 +1,101 @@ | 882 | @@ -0,0 +1,101 @@ |
875 | +/* Single-precision floating point square root. | 883 | +/* Single-precision floating point square root. |
876 | + Copyright (C) 2010 Free Software Foundation, Inc. | 884 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -966,16 +974,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc32/e6500/fpu/e_sqrtf.c libc/sysdeps/p | |||
966 | + feraiseexcept (FE_INVALID_SQRT); | 974 | + feraiseexcept (FE_INVALID_SQRT); |
967 | + | 975 | + |
968 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 976 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
969 | + if ((u.l[1] & FE_INVALID) == 0) | 977 | + if ((u.l & FE_INVALID) == 0) |
970 | +#endif | 978 | +#endif |
971 | + feraiseexcept (FE_INVALID); | 979 | + feraiseexcept (FE_INVALID); |
972 | + b = a_nan.value; | 980 | + b = a_nan.value; |
973 | + } | 981 | + } |
974 | + return f_washf (b); | 982 | + return f_washf (b); |
975 | +} | 983 | +} |
976 | diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | 984 | Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c |
977 | --- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 985 | =================================================================== |
978 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-06-14 14:51:50.452001745 -0500 | 986 | --- /dev/null |
987 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c | ||
979 | @@ -0,0 +1,134 @@ | 988 | @@ -0,0 +1,134 @@ |
980 | +/* Double-precision floating point square root. | 989 | +/* Double-precision floating point square root. |
981 | + Copyright (C) 2010 Free Software Foundation, Inc. | 990 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1059,7 +1068,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/po | |||
1059 | + | 1068 | + |
1060 | + g = b * y; | 1069 | + g = b * y; |
1061 | + h = 0.5 * y; | 1070 | + h = 0.5 * y; |
1062 | + | 1071 | + |
1063 | + /* Handle small numbers by scaling. */ | 1072 | + /* Handle small numbers by scaling. */ |
1064 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 1073 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
1065 | + return __ieee754_sqrt (b * two108) * twom54; | 1074 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -1104,16 +1113,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c libc/sysdeps/po | |||
1104 | + feraiseexcept (FE_INVALID_SQRT); | 1113 | + feraiseexcept (FE_INVALID_SQRT); |
1105 | + | 1114 | + |
1106 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 1115 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
1107 | + if ((u.l[1] & FE_INVALID) == 0) | 1116 | + if ((u.l & FE_INVALID) == 0) |
1108 | +#endif | 1117 | +#endif |
1109 | + feraiseexcept (FE_INVALID); | 1118 | + feraiseexcept (FE_INVALID); |
1110 | + b = a_nan.value; | 1119 | + b = a_nan.value; |
1111 | + } | 1120 | + } |
1112 | + return f_wash (b); | 1121 | + return f_wash (b); |
1113 | +} | 1122 | +} |
1114 | diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | 1123 | Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c |
1115 | --- libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 1124 | =================================================================== |
1116 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-06-14 14:51:50.452001745 -0500 | 1125 | --- /dev/null |
1126 | +++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c | ||
1117 | @@ -0,0 +1,101 @@ | 1127 | @@ -0,0 +1,101 @@ |
1118 | +/* Single-precision floating point square root. | 1128 | +/* Single-precision floating point square root. |
1119 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1129 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1209,16 +1219,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c libc/sysdeps/p | |||
1209 | + feraiseexcept (FE_INVALID_SQRT); | 1219 | + feraiseexcept (FE_INVALID_SQRT); |
1210 | + | 1220 | + |
1211 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 1221 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
1212 | + if ((u.l[1] & FE_INVALID) == 0) | 1222 | + if ((u.l & FE_INVALID) == 0) |
1213 | +#endif | 1223 | +#endif |
1214 | + feraiseexcept (FE_INVALID); | 1224 | + feraiseexcept (FE_INVALID); |
1215 | + b = a_nan.value; | 1225 | + b = a_nan.value; |
1216 | + } | 1226 | + } |
1217 | + return f_washf (b); | 1227 | + return f_washf (b); |
1218 | +} | 1228 | +} |
1219 | diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | 1229 | Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c |
1220 | --- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 1969-12-31 18:00:00.000000000 -0600 | 1230 | =================================================================== |
1221 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c 2012-06-14 14:56:02.080000985 -0500 | 1231 | --- /dev/null |
1232 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c | ||
1222 | @@ -0,0 +1,134 @@ | 1233 | @@ -0,0 +1,134 @@ |
1223 | +/* Double-precision floating point square root. | 1234 | +/* Double-precision floating point square root. |
1224 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1235 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1302,7 +1313,7 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/po | |||
1302 | + | 1313 | + |
1303 | + g = b * y; | 1314 | + g = b * y; |
1304 | + h = 0.5 * y; | 1315 | + h = 0.5 * y; |
1305 | + | 1316 | + |
1306 | + /* Handle small numbers by scaling. */ | 1317 | + /* Handle small numbers by scaling. */ |
1307 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) | 1318 | + if (__builtin_expect ((u.parts.msw & 0x7ff00000) <= 0x02000000, 0)) |
1308 | + return __ieee754_sqrt (b * two108) * twom54; | 1319 | + return __ieee754_sqrt (b * two108) * twom54; |
@@ -1347,16 +1358,17 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrt.c libc/sysdeps/po | |||
1347 | + feraiseexcept (FE_INVALID_SQRT); | 1358 | + feraiseexcept (FE_INVALID_SQRT); |
1348 | + | 1359 | + |
1349 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 1360 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
1350 | + if ((u.l[1] & FE_INVALID) == 0) | 1361 | + if ((u.l & FE_INVALID) == 0) |
1351 | +#endif | 1362 | +#endif |
1352 | + feraiseexcept (FE_INVALID); | 1363 | + feraiseexcept (FE_INVALID); |
1353 | + b = a_nan.value; | 1364 | + b = a_nan.value; |
1354 | + } | 1365 | + } |
1355 | + return f_wash (b); | 1366 | + return f_wash (b); |
1356 | +} | 1367 | +} |
1357 | diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | 1368 | Index: libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c |
1358 | --- libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 1969-12-31 18:00:00.000000000 -0600 | 1369 | =================================================================== |
1359 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c 2012-06-14 14:56:02.080000985 -0500 | 1370 | --- /dev/null |
1371 | +++ libc/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c | ||
1360 | @@ -0,0 +1,101 @@ | 1372 | @@ -0,0 +1,101 @@ |
1361 | +/* Single-precision floating point square root. | 1373 | +/* Single-precision floating point square root. |
1362 | + Copyright (C) 2010 Free Software Foundation, Inc. | 1374 | + Copyright (C) 2010 Free Software Foundation, Inc. |
@@ -1452,40 +1464,46 @@ diff -ruN libc-orig/sysdeps/powerpc/powerpc64/e6500/fpu/e_sqrtf.c libc/sysdeps/p | |||
1452 | + feraiseexcept (FE_INVALID_SQRT); | 1464 | + feraiseexcept (FE_INVALID_SQRT); |
1453 | + | 1465 | + |
1454 | + fenv_union_t u = { .fenv = fegetenv_register () }; | 1466 | + fenv_union_t u = { .fenv = fegetenv_register () }; |
1455 | + if ((u.l[1] & FE_INVALID) == 0) | 1467 | + if ((u.l & FE_INVALID) == 0) |
1456 | +#endif | 1468 | +#endif |
1457 | + feraiseexcept (FE_INVALID); | 1469 | + feraiseexcept (FE_INVALID); |
1458 | + b = a_nan.value; | 1470 | + b = a_nan.value; |
1459 | + } | 1471 | + } |
1460 | + return f_washf (b); | 1472 | + return f_washf (b); |
1461 | +} | 1473 | +} |
1462 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | 1474 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies |
1463 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1475 | =================================================================== |
1464 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies 2012-06-14 14:51:50.452001745 -0500 | 1476 | --- /dev/null |
1477 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/603e/fpu/Implies | ||
1465 | @@ -0,0 +1 @@ | 1478 | @@ -0,0 +1 @@ |
1466 | +powerpc/powerpc32/603e/fpu | 1479 | +powerpc/powerpc32/603e/fpu |
1467 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | 1480 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies |
1468 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1481 | =================================================================== |
1469 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies 2012-06-14 14:54:00.481000876 -0500 | 1482 | --- /dev/null |
1483 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e500mc/fpu/Implies | ||
1470 | @@ -0,0 +1 @@ | 1484 | @@ -0,0 +1 @@ |
1471 | +powerpc/powerpc32/e500mc/fpu | 1485 | +powerpc/powerpc32/e500mc/fpu |
1472 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | 1486 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies |
1473 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1487 | =================================================================== |
1474 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies 2012-06-14 14:54:17.000001007 -0500 | 1488 | --- /dev/null |
1489 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e5500/fpu/Implies | ||
1475 | @@ -0,0 +1 @@ | 1490 | @@ -0,0 +1 @@ |
1476 | +powerpc/powerpc32/e5500/fpu | 1491 | +powerpc/powerpc32/e5500/fpu |
1477 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | 1492 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies |
1478 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1493 | =================================================================== |
1479 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies 2012-06-14 14:54:31.054001299 -0500 | 1494 | --- /dev/null |
1495 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/e6500/fpu/Implies | ||
1480 | @@ -0,0 +1 @@ | 1496 | @@ -0,0 +1 @@ |
1481 | +powerpc/powerpc32/e6500/fpu | 1497 | +powerpc/powerpc32/e6500/fpu |
1482 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | 1498 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies |
1483 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1499 | =================================================================== |
1484 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies 2012-06-14 14:51:50.453001709 -0500 | 1500 | --- /dev/null |
1501 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e5500/fpu/Implies | ||
1485 | @@ -0,0 +1 @@ | 1502 | @@ -0,0 +1 @@ |
1486 | +powerpc/powerpc64/e5500/fpu | 1503 | +powerpc/powerpc64/e5500/fpu |
1487 | diff -ruN libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | 1504 | Index: libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies |
1488 | --- libc-orig/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 1969-12-31 18:00:00.000000000 -0600 | 1505 | =================================================================== |
1489 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies 2012-06-14 14:58:14.298001288 -0500 | 1506 | --- /dev/null |
1507 | +++ libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/e6500/fpu/Implies | ||
1490 | @@ -0,0 +1 @@ | 1508 | @@ -0,0 +1 @@ |
1491 | +powerpc/powerpc64/e6500/fpu | 1509 | +powerpc/powerpc64/e6500/fpu |