[Midnightbsd-cvs] src: msun/amd64: Merge changes.
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Thu Oct 30 17:56:04 EDT 2008
Log Message:
-----------
Merge changes.
Modified Files:
--------------
src/lib/msun/amd64:
Makefile.inc (r1.2 -> r1.3)
e_sqrt.S (r1.3 -> r1.4)
e_sqrtf.S (r1.2 -> r1.3)
fenv.c (r1.2 -> r1.3)
fenv.h (r1.2 -> r1.3)
-------------- next part --------------
Index: Makefile.inc
===================================================================
RCS file: /home/cvs/src/lib/msun/amd64/Makefile.inc,v
retrieving revision 1.2
retrieving revision 1.3
diff -L lib/msun/amd64/Makefile.inc -L lib/msun/amd64/Makefile.inc -u -r1.2 -r1.3
--- lib/msun/amd64/Makefile.inc
+++ lib/msun/amd64/Makefile.inc
@@ -1,6 +1,6 @@
-# $MidnightBSD$
-# $FreeBSD: src/lib/msun/amd64/Makefile.inc,v 1.4 2005/04/16 21:12:55 das Exp $
+# $FreeBSD: src/lib/msun/amd64/Makefile.inc,v 1.5 2006/03/27 23:59:44 deischen Exp $
ARCH_SRCS = e_sqrt.S e_sqrtf.S s_llrint.S s_llrintf.S s_lrint.S s_lrintf.S \
s_remquo.S s_remquof.S s_scalbn.S s_scalbnf.S s_scalbnl.S
LDBL_PREC = 64
+SYM_MAPS += ${.CURDIR}/amd64/Symbol.map
Index: fenv.h
===================================================================
RCS file: /home/cvs/src/lib/msun/amd64/fenv.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -L lib/msun/amd64/fenv.h -L lib/msun/amd64/fenv.h -u -r1.2 -r1.3
--- lib/msun/amd64/fenv.h
+++ lib/msun/amd64/fenv.h
@@ -23,8 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
- * $FreeBSD: src/lib/msun/amd64/fenv.h,v 1.5 2005/03/16 22:34:14 das Exp $
+ * $FreeBSD: src/lib/msun/amd64/fenv.h,v 1.6 2007/01/06 21:46:23 das Exp $
*/
#ifndef _FENV_H_
@@ -79,6 +78,9 @@
#define __fldcw(__cw) __asm __volatile("fldcw %0" : : "m" (__cw))
#define __fldenv(__env) __asm __volatile("fldenv %0" : : "m" (__env))
+#define __fldenvx(__env) __asm __volatile("fldenv %0" : : "m" (__env) \
+ : "st", "st(1)", "st(2)", "st(3)", "st(4)", \
+ "st(5)", "st(6)", "st(7)")
#define __fnclex() __asm __volatile("fnclex")
#define __fnstenv(__env) __asm __volatile("fnstenv %0" : "=m" (*(__env)))
#define __fnstcw(__cw) __asm __volatile("fnstcw %0" : "=m" (*(__cw)))
@@ -172,7 +174,15 @@
fesetenv(const fenv_t *__envp)
{
- __fldenv(__envp->__x87);
+ /*
+ * XXX Using fldenvx() instead of fldenv() tells the compiler that this
+ * instruction clobbers the i387 register stack. This happens because
+ * we restore the tag word from the saved environment. Normally, this
+ * would happen anyway and we wouldn't care, because the ABI allows
+ * function calls to clobber the i387 regs. However, fesetenv() is
+ * inlined, so we need to be more careful.
+ */
+ __fldenvx(__envp->__x87);
__ldmxcsr(__envp->__mxcsr);
return (0);
}
Index: fenv.c
===================================================================
RCS file: /home/cvs/src/lib/msun/amd64/fenv.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -L lib/msun/amd64/fenv.c -L lib/msun/amd64/fenv.c -u -r1.2 -r1.3
--- lib/msun/amd64/fenv.c
+++ lib/msun/amd64/fenv.c
@@ -23,8 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $MidnightBSD$
- * $FreeBSD: src/lib/msun/amd64/fenv.c,v 1.3 2005/03/16 19:03:45 das Exp $
+ * $FreeBSD: src/lib/msun/amd64/fenv.c,v 1.4 2007/01/05 07:15:26 das Exp $
*/
#include <sys/cdefs.h>
@@ -73,16 +72,14 @@
int
fegetenv(fenv_t *envp)
{
- int control;
- /*
- * fnstenv masks all exceptions, so we need to save and
- * restore the control word to avoid this side effect.
- */
- __fnstcw(&control);
__fnstenv(&envp->__x87);
__stmxcsr(&envp->__mxcsr);
- __fldcw(control);
+ /*
+ * fnstenv masks all exceptions, so we need to restore the
+ * control word to avoid this side effect.
+ */
+ __fldcw(envp->__x87.__control);
return (0);
}
Index: e_sqrt.S
===================================================================
RCS file: /home/cvs/src/lib/msun/amd64/e_sqrt.S,v
retrieving revision 1.3
retrieving revision 1.4
diff -L lib/msun/amd64/e_sqrt.S -L lib/msun/amd64/e_sqrt.S -u -r1.3 -r1.4
--- lib/msun/amd64/e_sqrt.S
+++ lib/msun/amd64/e_sqrt.S
@@ -22,12 +22,10 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $MidnightBSD$
- * $FreeBSD: src/lib/msun/amd64/e_sqrt.S,v 1.2 2005/02/04 14:08:32 das Exp $
*/
#include <machine/asm.h>
+__FBSDID("$FreeBSD: src/lib/msun/amd64/e_sqrt.S,v 1.2 2005/02/04 14:08:32 das Exp $")
ENTRY(sqrt)
sqrtsd %xmm0, %xmm0
Index: e_sqrtf.S
===================================================================
RCS file: /home/cvs/src/lib/msun/amd64/e_sqrtf.S,v
retrieving revision 1.2
retrieving revision 1.3
diff -L lib/msun/amd64/e_sqrtf.S -L lib/msun/amd64/e_sqrtf.S -u -r1.2 -r1.3
--- lib/msun/amd64/e_sqrtf.S
+++ lib/msun/amd64/e_sqrtf.S
@@ -22,12 +22,10 @@
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
- *
- * $MidnightBSD$
- * $FreeBSD: src/lib/msun/amd64/e_sqrtf.S,v 1.1 2005/04/16 21:12:55 das Exp $
*/
#include <machine/asm.h>
+__FBSDID("$FreeBSD: src/lib/msun/amd64/e_sqrtf.S,v 1.1 2005/04/16 21:12:55 das Exp $")
ENTRY(sqrtf)
sqrtss %xmm0, %xmm0
More information about the Midnightbsd-cvs
mailing list