Module Name: src
Committed By: mrg
Date: Thu Jan 28 05:08:11 UTC 2010
Modified Files:
src/sys/arch/sparc/sparc: locore.s
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.254 -r1.255 src/sys/arch/sparc/sparc/locore.s
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/sparc/sparc/locore.s
diff -u src/sys/arch/sparc/sparc/locore.s:1.254 src/sys/arch/sparc/sparc/locore.s:1.255
--- src/sys/arch/sparc/sparc/locore.s:1.254 Mon Jan 4 04:06:57 2010
+++ src/sys/arch/sparc/sparc/locore.s Thu Jan 28 05:08:11 2010
@@ -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)