summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch')
-rw-r--r--meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch123
1 files changed, 123 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch b/meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch
new file mode 100644
index 0000000000..9a932ff0d7
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/ppc_slow_ieee754_sqrt.patch
@@ -0,0 +1,123 @@
1 __ieee754_sqrt{,f} are now inline functions and call out __slow versions
2
3
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5Upstream-Status: Pending
6Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c
7===================================================================
8--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-07-03 22:36:01.172386436 -0700
9+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrt.c 2012-07-03 23:04:37.396469515 -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)
41Index: libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c
42===================================================================
43--- libc.orig/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-07-03 22:36:01.172386436 -0700
44+++ libc/sysdeps/powerpc/powerpc32/603e/fpu/e_sqrtf.c 2012-07-03 23:07:06.260476775 -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)
65Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c
66===================================================================
67--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-07-03 22:36:01.176386435 -0700
68+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrt.c 2012-07-03 23:14:16.328497458 -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)
100Index: libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c
101===================================================================
102--- libc.orig/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-07-03 22:36:01.176386435 -0700
103+++ libc/sysdeps/powerpc/powerpc64/e5500/fpu/e_sqrtf.c 2012-07-03 23:13:52.732496373 -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,10 @@
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 strong_alias (__ieee754_sqrtf, __sqrtf_finite)