Define proper macros for FP frame offsets rather than magic numbers.

This commit is contained in:
tsutsui 2000-11-21 13:54:13 +00:00
parent b7b6056081
commit 2c7e91a09e
18 changed files with 233 additions and 188 deletions

View File

@ -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_SP offsetof(struct frame, f_regs[15])
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)

View File

@ -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 @@ Lsw2:
#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 @@ Lsw2:
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 @@ Lresnonofpatall:
#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 @@ Lresfprest2:
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 @@ ENTRY(savectx)
#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 @@ ENTRY(savectx)
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 @@ ENTRY(m68881_save)
#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 @@ Lm68881sdone:
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 @@ ENTRY(m68881_restore)
#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 @@ Lm68881rdone:
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

View File

@ -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_ADJ offsetof(struct frame, f_stackadj)
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

View File

@ -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 @@ Lsw2:
#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 @@ Lswnofpsave:
#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 @@ Lnofprest:
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 @@ ENTRY(savectx)
#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 @@ Lsavedone:
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 @@ ENTRY(m68881_save)
#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 @@ Lm68881sdone:
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 @@ ENTRY(m68881_restore)
#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
@ -1611,10 +1611,10 @@ Lm68881rdone:
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.20 2000/06/29 08:23:02 mrg Exp $
# $NetBSD: genassym.cf,v 1.21 2000/11/21 13:54:14 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -226,6 +226,10 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# FP frame offsets
define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.110 2000/08/20 21:50:07 thorpej Exp $ */
/* $NetBSD: locore.s,v 1.111 2000/11/21 13:54:14 tsutsui Exp $ */
/*
* Copyright (c) 1994, 1995 Gordon W. Ross
@ -1323,8 +1323,8 @@ Lsw2:
fsave %a2@ | save FP state
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
Lswnofpsave:
clrl %a0@(P_BACK) | clear back link
@ -1374,8 +1374,8 @@ Lswnofpsave:
frestore %sp@+ | ...magic!
Lresnot040:
#endif
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
@ -1401,8 +1401,8 @@ ENTRY(savectx)
fsave %a0@ | save FP state
tstb %a0@ | null state frame?
jeq Lsvnofpsave | 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
Lsvnofpsave:
moveq #0,%d0 | return 0
rts
@ -1868,8 +1868,8 @@ ENTRY(m68881_save)
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
fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
@ -1877,8 +1877,8 @@ 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
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.3 2000/06/29 08:17:26 mrg Exp $
# $NetBSD: genassym.cf,v 1.4 2000/11/21 13:54:14 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -183,6 +183,10 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# FP frame offsets
define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.9 2000/08/20 21:50:08 thorpej Exp $ */
/* $NetBSD: locore.s,v 1.10 2000/11/21 13:54:14 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1070,8 +1070,8 @@ Lsw2:
#if defined(M68030) || defined(M68040)
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
#endif
Lswnofpsave:
@ -1122,8 +1122,8 @@ Lswnofpsave:
frestore sp@+ | ...magic!
Lresnot040:
#endif
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
#endif
Lresfprest:
frestore a0@ | restore state
@ -1149,8 +1149,8 @@ ENTRY(savectx)
fsave a0@ | save FP state
tstb a0@ | null state frame?
jeq Lsvnofpsave | 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
Lsvnofpsave:
moveq #0,d0 | return 0
rts
@ -1292,8 +1292,8 @@ ENTRY(m68881_save)
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
fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
@ -1301,8 +1301,8 @@ 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
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.19 2000/06/29 08:15:12 mrg Exp $
# $NetBSD: genassym.cf,v 1.20 2000/11/21 13:54:15 tsutsui Exp $
#
# Copyright (c) 1990 The Regents of the University of California.
@ -154,6 +154,10 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# FP frame offsets
define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.130 2000/08/20 21:50:08 thorpej Exp $ */
/* $NetBSD: locore.s,v 1.131 2000/11/21 13:54:15 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1110,8 +1110,8 @@ Lsw2:
fsave a2@ | save FP state
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
Lswnofpsave:
clrl a0@(P_BACK) | clear back link
@ -1159,8 +1159,8 @@ Lswnofpsave:
frestore sp@+ | ...magic!
Lresnot040:
#endif
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
@ -1186,8 +1186,8 @@ ENTRY(savectx)
fsave a0@ | save FP state
tstb a0@ | null state frame?
jeq Lsvnofpsave | 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
Lsvnofpsave:
moveq #0,d0 | return 0
rts
@ -1494,8 +1494,8 @@ ENTRY(m68881_save)
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
fmovem fp0-fp7,a0@(FPF_REGS) | save FP general registers
fmovem fpcr/fpsr/fpi,a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
@ -1503,8 +1503,8 @@ 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
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.18 2000/11/20 19:35:30 scw Exp $
# $NetBSD: genassym.cf,v 1.19 2000/11/21 13:54:15 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -202,6 +202,12 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# 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

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.66 2000/11/20 19:35:30 scw Exp $ */
/* $NetBSD: locore.s,v 1.67 2000/11/21 13:54:15 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1401,8 +1401,8 @@ Lsw2:
#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
#if defined(M68060)
jra Lswnofpsave
Lsavfp60:
@ -1411,10 +1411,10 @@ Lsavfp60:
#if defined(M68060)
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:
@ -1462,8 +1462,8 @@ Lswnofpsave:
#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:
#endif
frestore a0@ | restore state
@ -1476,10 +1476,10 @@ Lnofprest:
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
@ -1509,8 +1509,8 @@ ENTRY(savectx)
#endif
tstb a0@ | null state frame?
jeq Lsvnofpsave | 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
#if defined(M68060)
jra Lsvnofpsave
Lsvsavfp60:
@ -1519,10 +1519,10 @@ Lsvsavfp60:
#if defined(M68060)
tstb a0@(2) | null state frame?
jeq Lsvnofpsave | 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)
#endif
Lsvnofpsave:
moveq #0,d0 | return 0
@ -1691,8 +1691,8 @@ ENTRY(m68881_save)
Lm68881fpsave:
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
@ -1700,10 +1700,10 @@ Lm68881sdone:
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
@ -1718,8 +1718,8 @@ ENTRY(m68881_restore)
Lm68881fprestore:
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
@ -1728,10 +1728,10 @@ Lm68881rdone:
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.6 2000/11/09 14:17:20 tsutsui Exp $
# $NetBSD: genassym.cf,v 1.7 2000/11/21 13:54:15 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -204,6 +204,11 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# FP frame offsets
define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
define FPF_FPI offsetof(struct fpframe, fpf_fpiar)
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.14 2000/11/18 20:46:28 tsutsui Exp $ */
/* $NetBSD: locore.s,v 1.15 2000/11/21 13:54:15 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1104,8 +1104,8 @@ Lsw2:
fsave %a2@ | save FP state
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
Lswnofpsave:
clrl %a0@(P_BACK) | clear back link
@ -1147,8 +1147,8 @@ Lswnofpsave:
lea %a1@(PCB_FPCTX),%a0 | pointer to FP save area
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
Lnofprest:
@ -1173,8 +1173,8 @@ ENTRY(savectx)
fsave %a0@ | save FP state
tstb %a0@ | null state frame?
jeq Lsvnofpsave | 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
Lsvnofpsave:
moveq #0,%d0 | return 0
rts
@ -1407,8 +1407,8 @@ ENTRY(m68881_save)
Lm68881fpsave:
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
@ -1417,8 +1417,8 @@ ENTRY(m68881_restore)
Lm68881fprestore:
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.11 2000/06/29 07:58:50 mrg Exp $
# $NetBSD: genassym.cf,v 1.12 2000/11/21 13:54:16 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -197,6 +197,10 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# FP frame offsets
define FPF_REGS offsetof(struct fpframe, fpf_regs[0])
define FPF_FPCR offsetof(struct fpframe, fpf_fpcr)
# system calls
define SYS_exit SYS_exit
define SYS_execve SYS_execve

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.26 2000/08/20 21:50:10 thorpej Exp $ */
/* $NetBSD: locore.s,v 1.27 2000/11/21 13:54:16 tsutsui Exp $ */
/*
* Copyright (c) 1998 Darrin B. Jewell
@ -1234,8 +1234,8 @@ Lsw2:
fsave %a2@ | save FP state
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
Lswnofpsave:
clrl %a0@(P_BACK) | clear back link
@ -1285,8 +1285,8 @@ Lswnofpsave:
frestore %sp@+ | ...magic!
Lresnot040:
#endif
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
@ -1312,8 +1312,8 @@ ENTRY(savectx)
fsave %a0@ | save FP state
tstb %a0@ | null state frame?
jeq Lsvnofpsave | 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
Lsvnofpsave:
moveq #0,%d0 | return 0
rts
@ -1790,8 +1790,8 @@ ENTRY(m68881_save)
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
fmovem %fp0-%fp7,%a0@(FPF_REGS) | save FP general registers
fmovem %fpcr/%fpsr/%fpi,%a0@(FPF_FPCR) | save FP control registers
Lm68881sdone:
rts
@ -1799,8 +1799,8 @@ 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
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

View File

@ -1,4 +1,4 @@
# $NetBSD: genassym.cf,v 1.14 2000/06/29 07:07:55 mrg Exp $
# $NetBSD: genassym.cf,v 1.15 2000/11/21 13:54:16 tsutsui Exp $
#
# Copyright (c) 1982, 1990, 1993
@ -195,6 +195,12 @@ define FR_HW offsetof(struct frame, f_sr)
define FR_ADJ offsetof(struct frame, f_stackadj)
define FR_SIZE sizeof(struct trapframe)
# 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

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.s,v 1.61 2000/08/26 23:04:44 minoura Exp $ */
/* $NetBSD: locore.s,v 1.62 2000/11/21 13:54:16 tsutsui Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -1150,8 +1150,8 @@ Lsw2:
#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
#if defined(M68060)
jra Lswnofpsave
Lsavfp60:
@ -1160,10 +1160,10 @@ Lsavfp60:
#if defined(M68060)
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:
@ -1217,8 +1217,8 @@ Lswnofpsave:
frestore sp@+ | ...magic!
Lresnot040:
#endif
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
#if defined(M68060)
jra Lresfprest
Lresfp60rest1:
@ -1227,10 +1227,10 @@ Lresfp60rest1:
#if defined(M68060)
tstb a0@(2) | null state frame?
jeq Lresfprest | 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
#endif
Lresfprest:
frestore a0@ | restore state
@ -1261,8 +1261,8 @@ ENTRY(savectx)
#endif
tstb a0@ | null state frame?
jeq Lsvnofpsave | 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
#if defined(M68060)
jra Lsvnofpsave
Lsvsavfp60:
@ -1271,10 +1271,10 @@ Lsvsavfp60:
#if defined(M68060)
tstb a0@(2) | null state frame?
jeq Lsvnofpsave | 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)
#endif
Lsvnofpsave:
moveq #0,d0 | return 0
@ -1416,8 +1416,8 @@ ENTRY(m68881_save)
Lm68881fpsave:
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
@ -1425,10 +1425,10 @@ Lm68881sdone:
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
@ -1443,8 +1443,8 @@ ENTRY(m68881_restore)
Lm68881fprestore:
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
@ -1453,10 +1453,10 @@ Lm68881rdone:
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