Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/i386 In setregs(), initialize the process's MXCSR t...
details: https://anonhg.NetBSD.org/src/rev/67b2f3c676a5
branches: trunk
changeset: 513534:67b2f3c676a5
user: thorpej <thorpej%NetBSD.org@localhost>
date: Fri Aug 03 01:24:39 2001 +0000
description:
In setregs(), initialize the process's MXCSR to the reset-default
value as documented in the IA-32 Instruction Set Reference (in the
description of the LDMXCSR insn).
diffstat:
sys/arch/i386/i386/machdep.c | 7 ++++---
sys/arch/i386/include/npx.h | 8 +++++++-
2 files changed, 11 insertions(+), 4 deletions(-)
diffs (44 lines):
diff -r e63e7d21ffd3 -r 67b2f3c676a5 sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Fri Aug 03 01:21:34 2001 +0000
+++ b/sys/arch/i386/i386/machdep.c Fri Aug 03 01:24:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.451 2001/08/02 22:04:28 thorpej Exp $ */
+/* $NetBSD: machdep.c,v 1.452 2001/08/03 01:24:40 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -2166,9 +2166,10 @@
p->p_md.md_flags &= ~MDP_USEDFPU;
pcb->pcb_flags = 0;
- if (i386_use_fxsave)
+ if (i386_use_fxsave) {
pcb->pcb_savefpu.sv_xmm.sv_env.en_cw = __NetBSD_NPXCW__;
- else
+ pcb->pcb_savefpu.sv_xmm.sv_env.en_mxcsr = __INITIAL_MXCSR__;
+ } else
pcb->pcb_savefpu.sv_87.sv_env.en_cw = __NetBSD_NPXCW__;
tf = p->p_md.md_regs;
diff -r e63e7d21ffd3 -r 67b2f3c676a5 sys/arch/i386/include/npx.h
--- a/sys/arch/i386/include/npx.h Fri Aug 03 01:21:34 2001 +0000
+++ b/sys/arch/i386/include/npx.h Fri Aug 03 01:24:39 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npx.h,v 1.16 2001/08/03 01:11:49 thorpej Exp $ */
+/* $NetBSD: npx.h,v 1.17 2001/08/03 01:24:39 thorpej Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -150,6 +150,12 @@
#define __SVR4_NPXCW__ 0x0262
/*
+ * The default MXCSR value at reset is 0x1f80, IA-32 Instruction
+ * Set Reference, pg. 3-369.
+ */
+#define __INITIAL_MXCSR__ 0x1f80
+
+/*
* The standard control word from finit is 0x37F, giving:
* round to nearest
* 64-bit precision
Home |
Main Index |
Thread Index |
Old Index