Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amd64/amd64 from http://www.freshbsd.org/commit/ope...
details: https://anonhg.NetBSD.org/src/rev/fa40d334a09d
branches: trunk
changeset: 772138:fa40d334a09d
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Tue Dec 20 13:17:05 2011 +0000
description:
from http://www.freshbsd.org/commit/openbsd/ae7f934ae5bdf57dcf3431ba55fd1da93b8f1963
Initialize abridged tag word properly. x87 spec says FNINIT says tag word
contains FFFFh (all stack locations empty) which would make abridged tag
word 00h. From the Intel 64 and IA-32 Architectures Software Developer's
Manual:
"The FXSAVE instruction saves an abridged version of the x87 FPU tag word
in the FTW field (unlike the FSAVE instruction, which saves the complete
tag word). The tag information is saved in physical register order (R0
through R7), rather than in top-of- stack (TOS) order. With the FXSAVE
instruction, however, only a single bit (1 for valid or 0 for empty) is
saved for each tag."
ok rmind@
diffstat:
sys/arch/amd64/amd64/process_machdep.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r b023b56c3641 -r fa40d334a09d sys/arch/amd64/amd64/process_machdep.c
--- a/sys/arch/amd64/amd64/process_machdep.c Tue Dec 20 12:45:00 2011 +0000
+++ b/sys/arch/amd64/amd64/process_machdep.c Tue Dec 20 13:17:05 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: process_machdep.c,v 1.18 2010/12/20 00:25:24 matt Exp $ */
+/* $NetBSD: process_machdep.c,v 1.19 2011/12/20 13:17:05 jmcneill Exp $ */
/*-
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.18 2010/12/20 00:25:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.19 2011/12/20 13:17:05 jmcneill Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -124,7 +124,7 @@
memset(frame, 0, sizeof(*regs));
frame->fx_fcw = cw;
frame->fx_fsw = 0x0000;
- frame->fx_ftw = 0xff;
+ frame->fx_ftw = 0x00; /* abridged tag; all empty */
frame->fx_mxcsr = mxcsr;
frame->fx_mxcsr_mask = mxcsr_mask;
l->l_md.md_flags |= MDP_USEDFPU;
Home |
Main Index |
Thread Index |
Old Index