Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Merge m68881_save() and m68881_restore() (using mos...
details: https://anonhg.NetBSD.org/src/rev/4066920e436c
branches: trunk
changeset: 772187:4066920e436c
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Thu Dec 22 15:33:28 2011 +0000
description:
Merge m68881_save() and m68881_restore() (using most common mvme68k ones).
All functions are checked by my eyes, and all GENERIC kernels compile.
diffstat:
sys/arch/amiga/amiga/locore.s | 66 +--------------------------------------
sys/arch/atari/atari/locore.s | 60 +----------------------------------
sys/arch/cesfic/cesfic/locore.s | 27 +---------------
sys/arch/hp300/hp300/locore.s | 25 +--------------
sys/arch/luna68k/luna68k/locore.s | 25 +--------------
sys/arch/m68k/m68k/switch_subr.s | 64 +++++++++++++++++++++++++++++++++++++-
sys/arch/mac68k/mac68k/locore.s | 27 +---------------
sys/arch/mvme68k/mvme68k/locore.s | 62 +------------------------------------
sys/arch/news68k/news68k/locore.s | 27 +---------------
sys/arch/next68k/next68k/locore.s | 25 +--------------
sys/arch/sun3/sun3/locore.s | 25 +--------------
sys/arch/sun3/sun3x/locore.s | 25 +--------------
sys/arch/x68k/x68k/locore.s | 62 +------------------------------------
13 files changed, 75 insertions(+), 445 deletions(-)
diffs (truncated from 702 to 300 lines):
diff -r 5527f640a570 -r 4066920e436c sys/arch/amiga/amiga/locore.s
--- a/sys/arch/amiga/amiga/locore.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/amiga/amiga/locore.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.154 2011/11/26 14:05:52 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.155 2011/12/22 15:33:28 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1230,70 +1230,6 @@
Lploadw040: | should 68040 do a ptest?
rts
-#ifdef FPCOPROC
-/*
- * Save and restore 68881 state.
- * Pretty awful looking since our assembler does not
- * recognize FP mnemonics.
- */
-ENTRY(m68881_save)
- movl %sp@(4),%a0 | save area pointer
- fsave %a0@ | save state
-#if defined(M68020) || defined(M68030) || defined(M68040)
-#ifdef M68060
- cmpl #CPU_68060,_C_LABEL(cputype)
- jeq Lm68060fpsave
-#endif
- tstb %a0@ | null state frame?
- jeq Lm68881sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
-Lm68881sdone:
- rts
-#endif
-
-#ifdef M68060
-Lm68060fpsave:
- tstb %a0@(2) | null state frame?
- jeq Lm68060sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
- fmovem %fpcr,%a0@(FPF_FPCR) | save FP control registers
- fmovem %fpsr,%a0@(FPF_FPSR)
- fmovem %fpi,%a0@(FPF_FPI)
-Lm68060sdone:
- rts
-#endif
-
-ENTRY(m68881_restore)
- movl %sp@(4),%a0 | save area pointer
-#if defined(M68020) || defined(M68030) || defined(M68040)
-#if defined(M68060)
- cmpl #CPU_68060,_C_LABEL(cputype)
- jeq Lm68060fprestore
-#endif
- tstb %a0@ | null state frame?
- jeq Lm68881rdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68881rdone:
- frestore %a0@ | restore state
- rts
-#endif
-
-#ifdef M68060
-Lm68060fprestore:
- tstb %a0@(2) | null state frame?
- jeq Lm68060fprdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr | restore FP control registers
- fmovem %a0@(FPF_FPSR),%fpsr
- fmovem %a0@(FPF_FPI),%fpi
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68060fprdone:
- frestore %a0@ | restore state
- rts
-#endif
-#endif
-
/*
* Handle the nitty-gritty of rebooting the machine.
*
diff -r 5527f640a570 -r 4066920e436c sys/arch/atari/atari/locore.s
--- a/sys/arch/atari/atari/locore.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/atari/atari/locore.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.109 2011/11/15 10:57:01 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.110 2011/12/22 15:33:28 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1271,64 +1271,6 @@
rts
/*
- * Save and restore 68881 state.
- * Pretty awful looking since our assembler does not
- * recognize FP mnemonics.
- */
-ENTRY(m68881_save)
- movl %sp@(4),%a0 | save area pointer
- fsave %a0@ | save state
-#if defined(M68060)
- cmpl #CPU_68060,_C_LABEL(cputype)
- jeq Lm68060fpsave | Handle 060 fpu
-#endif
- tstb %a0@ | null state frame?
- jeq Lm68881sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
-Lm68881sdone:
- rts
-
-#if defined(M68060)
-Lm68060fpsave:
- tstb %a0@(2) | null state frame?
- jeq Lm68060sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS)| save FP general registers
- fmovem %fpcr,%a0@(FPF_FPCR) | save FP control registers
- fmovem %fpsr,%a0@(FPF_FPSR)
- fmovem %fpi,%a0@(FPF_FPI)
-Lm68060sdone:
- rts
-#endif
-
-ENTRY(m68881_restore)
- movl %sp@(4),%a0 | save area pointer
-#if defined(M68060)
- cmpl #CPU_68060,_C_LABEL(cputype)
- jeq Lm68060fprestore | a 060 fpu
-#endif
- tstb %a0@ | null state frame?
- jeq Lm68881rdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68881rdone:
- frestore %a0@ | restore state
- rts
-
-#if defined(M68060)
-Lm68060fprestore:
- tstb %a0@(2) | null state frame?
- jeq Lm68060fprdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr | restore FP control registers
- fmovem %a0@(FPF_FPSR),%fpsr
- fmovem %a0@(FPF_FPI),%fpi
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68060fprdone:
- frestore %a0@ | restore state
- rts
-#endif
-
-/*
* Handle the nitty-gritty of rebooting the machine.
*
*/
diff -r 5527f640a570 -r 4066920e436c sys/arch/cesfic/cesfic/locore.s
--- a/sys/arch/cesfic/cesfic/locore.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/cesfic/cesfic/locore.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.27 2011/11/26 14:05:52 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.28 2011/12/22 15:33:29 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -1084,31 +1084,6 @@
jgt L_delay
rts
-/*
- * Save and restore 68881 state.
- * Pretty awful looking since our assembler does not
- * recognize FP mnemonics.
- */
-ENTRY(m68881_save)
- movl %sp@(4),%a0 | save area pointer
- fsave %a0@ | save state
- tstb %a0@ | null state frame?
- jeq Lm68881sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(216) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a0@(312) | save FP control registers
-Lm68881sdone:
- rts
-
-ENTRY(m68881_restore)
- movl %sp@(4),%a0 | save area pointer
- tstb %a0@ | null state frame?
- jeq Lm68881rdone | yes, easy
- fmovem %a0@(312),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(216),%fp0-%fp7 | restore FP general registers
-Lm68881rdone:
- frestore %a0@ | restore state
- rts
-
ENTRY_NOPROFILE(doboot)
movl #0x5c00c060, %d0 | want phys addressing
.long 0x4e7b0006 | movc d0,dtt0
diff -r 5527f640a570 -r 4066920e436c sys/arch/hp300/hp300/locore.s
--- a/sys/arch/hp300/hp300/locore.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/hp300/hp300/locore.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.164 2011/11/26 14:05:52 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.165 2011/12/22 15:33:29 tsutsui Exp $ */
/*
* Copyright (c) 1980, 1990, 1993
@@ -1364,29 +1364,6 @@
rts
/*
- * Save and restore 68881 state.
- */
-ENTRY(m68881_save)
- movl %sp@(4),%a0 | save area pointer
- fsave %a0@ | save state
- tstb %a0@ | null state frame?
- jeq Lm68881sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
-Lm68881sdone:
- rts
-
-ENTRY(m68881_restore)
- movl %sp@(4),%a0 | save area pointer
- tstb %a0@ | null state frame?
- jeq Lm68881rdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68881rdone:
- frestore %a0@ | restore state
- rts
-
-/*
* Probe a memory address, and see if it causes a bus error.
* This function is only to be used in physical mode, and before our
* trap vectors are initialized.
diff -r 5527f640a570 -r 4066920e436c sys/arch/luna68k/luna68k/locore.s
--- a/sys/arch/luna68k/luna68k/locore.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/luna68k/luna68k/locore.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.46 2011/11/26 14:05:52 tsutsui Exp $ */
+/* $NetBSD: locore.s,v 1.47 2011/12/22 15:33:30 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1048,29 +1048,6 @@
rts
/*
- * Save and restore 68881 state.
- */
-ENTRY(m68881_save)
- movl %sp@(4),%a0 | save area pointer
- fsave %a0@ | save state
- tstb %a0@ | null state frame?
- jeq Lm68881sdone | yes, all done
- fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
-Lm68881sdone:
- rts
-
-ENTRY(m68881_restore)
- movl %sp@(4),%a0 | save area pointer
- tstb %a0@ | null state frame?
- jeq Lm68881rdone | yes, easy
- fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
-Lm68881rdone:
- frestore %a0@ | restore state
- rts
-
-/*
* Do a dump.
* Called by auto-restart.
*/
diff -r 5527f640a570 -r 4066920e436c sys/arch/m68k/m68k/switch_subr.s
--- a/sys/arch/m68k/m68k/switch_subr.s Thu Dec 22 15:07:08 2011 +0000
+++ b/sys/arch/m68k/m68k/switch_subr.s Thu Dec 22 15:33:28 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: switch_subr.s,v 1.27 2011/02/08 20:20:16 rmind Exp $ */
+/* $NetBSD: switch_subr.s,v 1.28 2011/12/22 15:33:29 tsutsui Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation.
@@ -346,6 +346,68 @@
#endif
/*
+ * Save and restore 68881 state.
+ */
+#ifdef FPCOPROC
+ENTRY(m68881_save)
+ movl %sp@(4),%a0 | save area pointer
+ fsave %a0@ | save state
+#if defined(M68020) || defined(M68030) || defined(M68040)
+#if defined(M68060)
+ cmpl #FPU_68060,_C_LABEL(fputype)
+ jeq Lm68060fpsave
+#endif
+Lm68881fpsave:
+ tstb %a0@ | null state frame?
+ jeq Lm68881sdone | yes, all done
Home |
Main Index |
Thread Index |
Old Index