Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/sparc in savefpstate(), make sure we fill in ...
details: https://anonhg.NetBSD.org/src/rev/caf92742a09a
branches: trunk
changeset: 751206:caf92742a09a
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jan 28 05:08:11 2010 +0000
description:
in savefpstate(), make sure we fill in the _first_ read of %fsr into
the fpstate structure, not the last one. avoids fs->fs_fsr lacking the
traptype field later when fpu_cleanup() is processing it, which leads
to a panic() occuring.
idea, and code suggestions from uwe.
diffstat:
sys/arch/sparc/sparc/locore.s | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 6a2af42c1422 -r caf92742a09a sys/arch/sparc/sparc/locore.s
--- a/sys/arch/sparc/sparc/locore.s Thu Jan 28 03:09:13 2010 +0000
+++ b/sys/arch/sparc/sparc/locore.s Thu Jan 28 05:08:11 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.254 2010/01/04 04:06:57 mrg Exp $ */
+/* $NetBSD: locore.s,v 1.255 2010/01/28 05:08:11 mrg Exp $ */
/*
* Copyright (c) 1996 Paul Kranenburg
@@ -5881,8 +5881,8 @@
* So we still have to check the blasted QNE bit.
* With any luck it will usually not be set.
*/
- ld [%o0 + FS_FSR], %o4 ! if (f->fs_fsr & QNE)
- btst %o5, %o4
+ ld [%o0 + FS_FSR], %o2 ! if (f->fs_fsr & QNE)
+ btst %o5, %o2
bnz Lfp_storeq ! goto storeq;
std %f0, [%o0 + FS_REGS + (4*0)] ! f->fs_f0 = etc;
Lfp_finish:
@@ -5917,6 +5917,7 @@
btst %o5, %o4
bnz 1b
inc 8, %o3
+ st %o2, [%o0 + FS_FSR] ! fs->fs_fsr = original_fsr
b Lfp_finish ! set qsize and finish storing fregs
srl %o3, 3, %o3 ! (but first fix qsize)
Home |
Main Index |
Thread Index |
Old Index