- Fix fenv.h to work with -m32.
This commit is contained in:
parent
3d90229003
commit
7c988d1351
42
glibc-fenvfix.patch
Normal file
42
glibc-fenvfix.patch
Normal file
@ -0,0 +1,42 @@
|
||||
commit a728a38fb658f8b2f0acbea8a586db8bd054f3fe
|
||||
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Wed Jun 6 10:11:14 2012 -0700
|
||||
|
||||
Check __SSE_MATH__ in x86_64 feraiseexcept
|
||||
|
||||
2012-06-06 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
[BZ #14117]
|
||||
* sysdeps/x86_64/fpu/bits/fenv.h (feraiseexcept): Check
|
||||
__SSE_MATH__.
|
||||
|
||||
diff --git a/sysdeps/x86_64/fpu/bits/fenv.h b/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
index bb790c9..b2c01c4 100644
|
||||
--- a/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
+++ b/sysdeps/x86_64/fpu/bits/fenv.h
|
||||
@@ -109,7 +109,12 @@ __NTH (feraiseexcept (int __excepts))
|
||||
/* One example of a invalid operation is 0.0 / 0.0. */
|
||||
float __f = 0.0;
|
||||
|
||||
+# ifdef __SSE_MATH__
|
||||
__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)
|
||||
@@ -117,7 +122,12 @@ __NTH (feraiseexcept (int __excepts))
|
||||
float __f = 1.0;
|
||||
float __g = 0.0;
|
||||
|
||||
+# ifdef __SSE_MATH__
|
||||
__asm__ __volatile__ ("divss %1, %0" : : "x" (__f), "x" (__g));
|
||||
+# else
|
||||
+ __asm__ __volatile__ ("fdivp %%st, %%st(1); fwait"
|
||||
+ : "=t" (__f) : "0" (__f), "u" (__g) : "st(1)");
|
||||
+# endif
|
||||
(void) &__f;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
Summary: The GNU libc libraries
|
||||
Name: glibc
|
||||
Version: %{glibcversion}
|
||||
Release: 57%{?dist}
|
||||
Release: 58%{?dist}
|
||||
# GPLv2+ is used in a bunch of programs, LGPLv2+ is used for libraries.
|
||||
# Things that are linked directly into dynamically linked programs
|
||||
# and shared libraries (e.g. crt files, lib*_nonshared.a) have an additional
|
||||
@ -120,6 +120,7 @@ Patch1052: %{name}-sw13979.patch
|
||||
Patch1053: %{name}-rh817276.patch
|
||||
Patch1054: %{name}-rh808014.patch
|
||||
Patch1068: %{name}-rh845960.patch
|
||||
Patch1071: glibc-fenvfix.patch
|
||||
|
||||
#
|
||||
# Patches submitted, but not yet approved upstream.
|
||||
@ -511,6 +512,7 @@ popd
|
||||
%patch1068 -p1
|
||||
%patch2069 -p1
|
||||
%patch2070 -p1
|
||||
%patch1071 -p1
|
||||
|
||||
# A lot of programs still misuse memcpy when they have to use
|
||||
# memmove. The memcpy implementation below is not tolerant at
|
||||
@ -1377,6 +1379,9 @@ rm -f *.filelist*
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Nov 7 2012 Jeff Law <law@redhat.com> - 2.15.58
|
||||
- Fix fenv.h to work with -m32.
|
||||
|
||||
* Fri Sep 14 2012 Jeff Law <law@redhat.com> - 2.15.57
|
||||
- Fix prototype of sigsetjmp in pthread.h (#857236).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user