generic-poky/meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch

37 lines
1002 B
Diff

Without this patch it fails to inline that function
since we do not have __SSE_MATH__ in OE build.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Inappropriate [OE-specific]
--- a/sysdeps/x86_64/fpu/bits/fenv.h
+++ b/sysdeps/x86_64/fpu/bits/fenv.h
@@ -112,16 +112,24 @@ __NTH (feraiseexcept (int __excepts))
{
/* One example of a invalid operation is 0.0 / 0.0. */
float __f = 0.0;
-
+# if defined __SSE_MATH__ || __WORDSIZE == 64
__asm__ __volatile__ ("divss %0, %0 " : : "x" (__f));
+# else
+ __asm__ __volatile__ ("fdiv %%st, %%st(0); fwait"
+ : "=t" (__f) : "0" (__f));
+# endif
(void) &__f;
}
if ((FE_DIVBYZERO & __excepts) != 0)
{
float __f = 1.0;
float __g = 0.0;
-
+# if defined __SSE_MATH__ || __WORDSIZE == 64
__asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
+# else
+ __asm__ __volatile__ ("fdivp %%st(1), %%st; fwait"
+ : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
+# endif
(void) &__f;
}