diff options
Diffstat (limited to 'meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch')
-rw-r--r-- | meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch b/meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch new file mode 100644 index 000000000..40c1c4d67 --- /dev/null +++ b/meta/recipes-core/eglibc/eglibc-2.15/x86_fenv.patch @@ -0,0 +1,29 @@ +--- 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; + } + |