Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Define proper macros for FP frame offsets rather th...
details: https://anonhg.NetBSD.org/src/rev/1688756c725a
branches: trunk
changeset: 499515:1688756c725a
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue Nov 21 13:54:13 2000 +0000
description:
Define proper macros for FP frame offsets rather than magic numbers.
diffstat:
sys/arch/amiga/amiga/genassym.cf | 8 ++++-
sys/arch/amiga/amiga/locore.s | 62 ++++++++++++++++++------------------
sys/arch/atari/atari/genassym.cf | 8 ++++-
sys/arch/atari/atari/locore.s | 62 ++++++++++++++++++------------------
sys/arch/hp300/hp300/genassym.cf | 6 ++-
sys/arch/hp300/hp300/locore.s | 22 ++++++------
sys/arch/luna68k/luna68k/genassym.cf | 6 ++-
sys/arch/luna68k/luna68k/locore.s | 22 ++++++------
sys/arch/mac68k/mac68k/genassym.cf | 6 ++-
sys/arch/mac68k/mac68k/locore.s | 22 ++++++------
sys/arch/mvme68k/mvme68k/genassym.cf | 8 ++++-
sys/arch/mvme68k/mvme68k/locore.s | 62 ++++++++++++++++++------------------
sys/arch/news68k/news68k/genassym.cf | 7 +++-
sys/arch/news68k/news68k/locore.s | 22 ++++++------
sys/arch/next68k/next68k/genassym.cf | 6 ++-
sys/arch/next68k/next68k/locore.s | 22 ++++++------
sys/arch/x68k/x68k/genassym.cf | 8 ++++-
sys/arch/x68k/x68k/locore.s | 62 ++++++++++++++++++------------------
18 files changed, 233 insertions(+), 188 deletions(-)
diffs (truncated from 1063 to 300 lines):
diff -r 12a5ba12618c -r 1688756c725a sys/arch/amiga/amiga/genassym.cf
--- a/sys/arch/amiga/amiga/genassym.cf Tue Nov 21 13:50:25 2000 +0000
+++ b/sys/arch/amiga/amiga/genassym.cf Tue Nov 21 13:54:13 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.13 2000/06/29 08:44:03 mrg Exp $
+# $NetBSD: genassym.cf,v 1.14 2000/11/21 13:54:13 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@@ -172,6 +172,12 @@
define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
+# FP frame offsets
+define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
+define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
+define FPF_FPSR offsetof(struct fpframe, fpf_fpsr)
+define FPF_FPI offsetof(struct fpframe, fpf_fpiar)
+
# isr fields
define ISR_FORW offsetof(struct isr, isr_forw)
define ISR_INTR offsetof(struct isr, isr_intr)
diff -r 12a5ba12618c -r 1688756c725a sys/arch/amiga/amiga/locore.s
--- a/sys/arch/amiga/amiga/locore.s Tue Nov 21 13:50:25 2000 +0000
+++ b/sys/arch/amiga/amiga/locore.s Tue Nov 21 13:54:13 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.118 2000/09/02 04:50:08 mhitch Exp $ */
+/* $NetBSD: locore.s,v 1.119 2000/11/21 13:54:13 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1254,8 +1254,8 @@
#endif
tstb %a2@ | null state frame?
jeq Lswnofpsave | yes, all done
- fmovem %fp0-%fp7,%a2@(216) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a2@(312) | save FP control registers
+ fmovem %fp0-%fp7,%a2@(FPF_REGS) | save FP general registers
+ fmovem %fpcr/%fpsr/%fpi,%a2@(FPF_FPCR) | save FP control registers
#ifdef M68060
jra Lswnofpsave
#endif
@@ -1264,10 +1264,10 @@
Lsavfp60:
tstb %a2@(2) | null state frame?
jeq Lswnofpsave | yes, all done
- fmovem %fp0-%fp7,%a2@(216) | save FP general registers
- fmovem %fpcr,%a2@(312) | save FP control registers
- fmovem %fpsr,%a2@(316)
- fmovem %fpi,%a2@(320)
+ fmovem %fp0-%fp7,%a2@(FPF_REGS) | save FP general registers
+ fmovem %fpcr,%a2@(FPF_FPCR) | save FP control registers
+ fmovem %fpsr,%a2@(FPF_FPSR)
+ fmovem %fpi,%a2@(FPF_FPI)
#endif
Lswnofpsave:
#endif
@@ -1322,8 +1322,8 @@
#endif
tstb %a0@ | null state frame?
jeq Lresfprest2 | yes, easy
- fmovem %a0@(312),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(216),%fp0-%fp7 | restore FP general registers
+ fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
+ fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
Lresfprest2:
frestore %a0@ | restore state
movw %a1@(PCB_PS),%sr | no, restore PS
@@ -1335,10 +1335,10 @@
Lresfp60rest1:
tstb %a0@(2) | null state frame?
jeq Lresfp60rest2 | yes, easy
- fmovem %a0@(312),%fpcr | restore FP control registers
- fmovem %a0@(316),%fpsr
- fmovem %a0@(320),%fpi
- fmovem %a0@(216),%fp0-%fp7 | restore FP general registers
+ 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
Lresfp60rest2:
frestore %a0@ | restore state
movw %a1@(PCB_PS),%sr | no, restore PS
@@ -1372,8 +1372,8 @@
#endif
tstb a0@ | null state frame?
jeq Lsavedone | yes, all done
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr/fpsr/fpi,a0@(312) | save FP control registers
+ fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
+ fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
#ifdef M68060
moveq #0,d0
rts
@@ -1383,10 +1383,10 @@
Lsavctx60:
tstb a0@(2)
jeq Lsavedone
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr,a0@(312) | save FP control registers
- fmovem fpsr,a0@(316)
- fmovem fpi,a0@(320)
+ 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)
#endif
#endif
Lsavedone:
@@ -1610,8 +1610,8 @@
#endif
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
+ fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
+ fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
#endif
@@ -1620,10 +1620,10 @@
Lm68060fpsave:
tstb a0@(2) | null state frame?
jeq Lm68060sdone | yes, all done
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr,a0@(312) | save FP control registers
- fmovem fpsr,a0@(316)
- fmovem fpi,a0@(320)
+ 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
@@ -1637,8 +1637,8 @@
#endif
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
+ 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
@@ -1648,10 +1648,10 @@
Lm68060fprestore:
tstb a0@(2) | null state frame?
jeq Lm68060fprdone | yes, easy
- fmovem a0@(312),fpcr | restore FP control registers
- fmovem a0@(316),fpsr
- fmovem a0@(320),fpi
- fmovem a0@(216),fp0-fp7 | restore FP general registers
+ 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
diff -r 12a5ba12618c -r 1688756c725a sys/arch/atari/atari/genassym.cf
--- a/sys/arch/atari/atari/genassym.cf Tue Nov 21 13:50:25 2000 +0000
+++ b/sys/arch/atari/atari/genassym.cf Tue Nov 21 13:54:13 2000 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.15 2000/06/29 08:28:23 mrg Exp $
+# $NetBSD: genassym.cf,v 1.16 2000/11/21 13:54:14 tsutsui Exp $
#-
# Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -182,6 +182,12 @@
define FR_SIZE sizeof(struct trapframe)
define SP SP
+# FP frame offsets
+define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
+define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
+define FPF_FPSR offsetof(struct fpframe, fpf_fpsr)
+define FPF_FPI offsetof(struct fpframe, fpf_fpiar)
+
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve
diff -r 12a5ba12618c -r 1688756c725a sys/arch/atari/atari/locore.s
--- a/sys/arch/atari/atari/locore.s Tue Nov 21 13:50:25 2000 +0000
+++ b/sys/arch/atari/atari/locore.s Tue Nov 21 13:54:13 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.s,v 1.73 2000/10/09 06:15:02 leo Exp $ */
+/* $NetBSD: locore.s,v 1.74 2000/11/21 13:54:14 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -1192,17 +1192,17 @@
#endif
tstb %a2@ | null state frame?
jeq Lswnofpsave | yes, all done
- fmovem %fp0-%fp7,%a2@(216) | save FP general registers
- fmovem %fpcr/%fpsr/%fpi,%a2@(312) | save FP control registers
+ fmovem %fp0-%fp7,%a2@(FPF_REGS) | save FP general registers
+ fmovem %fpcr/%fpsr/%fpi,%a2@(FPF_FPCR) | save FP control registers
#ifdef M68060
jra Lswnofpsave
Lsavfp60:
tstb %a2@(2) | null state frame?
jeq Lswnofpsave | yes, all done
- fmovem %fp0-%fp7,%a2@(216) | save FP general registers
- fmovem %fpcr,%a2@(312) | save FP control registers
- fmovem %fpsr,%a2@(316)
- fmovem %fpi,%a2@(320)
+ fmovem %fp0-%fp7,%a2@(FPF_REGS) | save FP general registers
+ fmovem %fpcr,%a2@(FPF_FPCR) | save FP control registers
+ fmovem %fpsr,%a2@(FPF_FPSR)
+ fmovem %fpi,%a2@(FPF_FPI)
#endif
Lswnofpsave:
@@ -1248,8 +1248,8 @@
#endif
tstb %a0@ | null state frame?
jeq Lresfprest | yes, easy
- fmovem %a0@(312),%fpcr/%fpsr/%fpi | restore FP control registers
- fmovem %a0@(216),%fp0-%fp7 | restore FP general registers
+ fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
+ fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
Lresfprest:
frestore %a0@ | restore state
@@ -1262,10 +1262,10 @@
Lresfp60rest1:
tstb %a0@(2) | null state frame?
jeq Lresfp60rest2 | yes, easy
- fmovem %a0@(312),%fpcr | restore FP control registers
- fmovem %a0@(316),%fpsr
- fmovem %a0@(320),%fpi
- fmovem %a0@(216),%fp0-%fp7 | restore FP general registers
+ 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
Lresfp60rest2:
frestore %a0@ | restore state
movw %a1@(PCB_PS),%sr | no, restore PS
@@ -1294,8 +1294,8 @@
#endif
tstb a0@ | null state frame?
jeq Lsavedone | yes, all done
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr/fpsr/fpi,a0@(312) | save FP control registers
+ fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
+ fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
Lsavedone:
moveq #0,d0 | return 0
rts
@@ -1304,10 +1304,10 @@
Lsavctx60:
tstb a0@(2)
jeq Lsavedone
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr,a0@(312) | save FP control registers
- fmovem fpsr,a0@(316)
- fmovem fpi,a0@(320)
+ 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)
moveq #0,d0 | return 0
rts
#endif
@@ -1576,8 +1576,8 @@
#endif
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
+ fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
+ fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
@@ -1585,10 +1585,10 @@
Lm68060fpsave:
tstb a0@(2) | null state frame?
jeq Lm68060sdone | yes, all done
- fmovem fp0-fp7,a0@(216) | save FP general registers
- fmovem fpcr,a0@(312) | save FP control registers
- fmovem fpsr,a0@(316)
- fmovem fpi,a0@(320)
+ 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
@@ -1601,8 +1601,8 @@
#endif
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
Home |
Main Index |
Thread Index |
Old Index