Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/m68k/m68k Check whether we have an FPU regardless o...



details:   https://anonhg.NetBSD.org/src/rev/973386fad476
branches:  trunk
changeset: 790482:973386fad476
user:      isaki <isaki%NetBSD.org@localhost>
date:      Mon Oct 14 12:20:05 2013 +0000

description:
Check whether we have an FPU regardless of FPU_EMULATE option.
It prevents a kernel panic when we don't have an FPU and FPU_EMULATE
option is not set.
Thanks tsutsui@ for advice.

diffstat:

 sys/arch/m68k/m68k/switch_subr.s |  11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diffs (45 lines):

diff -r 1249316c0b3f -r 973386fad476 sys/arch/m68k/m68k/switch_subr.s
--- a/sys/arch/m68k/m68k/switch_subr.s  Mon Oct 14 11:11:13 2013 +0000
+++ b/sys/arch/m68k/m68k/switch_subr.s  Mon Oct 14 12:20:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: switch_subr.s,v 1.31 2013/09/07 19:06:29 chs Exp $     */
+/*     $NetBSD: switch_subr.s,v 1.32 2013/10/14 12:20:05 isaki Exp $   */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation.
@@ -109,10 +109,9 @@
        jbsr    _ASM_LABEL(m68k_fpuctx_save)
 #else
 #ifdef FPCOPROC
-#ifdef FPU_EMULATE
        tstl    _C_LABEL(fputype)       | Do we have an FPU?
        jeq     .Lcpu_switch_nofpsave   | No  Then don't attempt save.
-#endif
+
        lea     PCB_FPCTX(%a1),%a2      | pointer to FP save area
        fsave   (%a2)                   | save FP state
 #if defined(M68020) || defined(M68030) || defined(M68040)
@@ -222,10 +221,9 @@
        moveml  (%sp)+,%d0/%d1
 #else
 #ifdef FPCOPROC
-#ifdef FPU_EMULATE
        tstl    _C_LABEL(fputype)       | Do we have an FPU?
        jeq     .Lcpu_switch_nofprest   | No  Then don't attempt restore.
-#endif
+
        lea     PCB_FPCTX(%a1),%a0      | pointer to FP save area
 #if defined(M68020) || defined(M68030) || defined(M68040)
 #if defined(M68060)
@@ -279,10 +277,9 @@
        jbsr    _ASM_LABEL(m68k_fpuctx_save)
 #else
 #ifdef FPCOPROC
-#ifdef FPU_EMULATE
        tstl    _C_LABEL(fputype)       | Do we have FPU?
        jeq     .Lsavectx_nofpsave      | No?  Then don't save state.
-#endif
+
        lea     PCB_FPCTX(%a1),%a0      | pointer to FP save area
        fsave   (%a0)                   | save FP state
 #if defined(M68020) || defined(M68030) || defined(M68040)



Home | Main Index | Thread Index | Old Index