Restore FPU context properly on 68060-specific kernels...
This commit is contained in:
parent
cb6f78fe5d
commit
db111a0133
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: locore.s,v 1.85 2001/07/06 19:00:14 scw Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.86 2001/07/18 17:13:15 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -1430,9 +1430,8 @@ Lswnofpsave:
|
|||
moveml %a1@(PCB_REGS),#0xFCFC | and registers
|
||||
movl %a1@(PCB_USP),%a0
|
||||
movl %a0,%usp | and USP
|
||||
|
||||
tstl _C_LABEL(fputype) | If we don't have an FPU,
|
||||
jeq Lnofprest | don't try to restore it.
|
||||
tstl _C_LABEL(fputype) | Do we have an FPU?
|
||||
jeq Lnofprest | No Then don't attempt restore.
|
||||
lea %a1@(PCB_FPCTX),%a0 | pointer to FP save area
|
||||
#if defined(M68020) || defined(M68030) || defined(M68040)
|
||||
#if defined(M68060)
|
||||
|
@ -1443,28 +1442,26 @@ Lswnofpsave:
|
|||
jeq Lresfprest | yes, easy
|
||||
fmovem %a0@(FPF_FPCR),%fpcr/%fpsr/%fpi | restore FP control registers
|
||||
fmovem %a0@(FPF_REGS),%fp0-%fp7 | restore FP general registers
|
||||
Lresfprest:
|
||||
#if defined(M68060)
|
||||
jra Lresfprest
|
||||
#endif
|
||||
#endif
|
||||
frestore %a0@ | restore state
|
||||
Lnofprest:
|
||||
movw %a1@(PCB_PS),%sr | restore PS
|
||||
moveq #1,%d0 | return 1 (for alternate returns)
|
||||
rts
|
||||
|
||||
#if defined(M68060)
|
||||
Lresfp60rest1:
|
||||
tstb %a0@(2) | null state frame?
|
||||
jeq Lresfp60rest2 | yes, easy
|
||||
jeq Lresfprest | 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
|
||||
Lresfp60rest2:
|
||||
#endif
|
||||
Lresfprest:
|
||||
frestore %a0@ | restore state
|
||||
Lnofprest:
|
||||
movw %a1@(PCB_PS),%sr | no, restore PS
|
||||
moveq #1,%d0 | return 1 (for alternate returns)
|
||||
rts
|
||||
#endif
|
||||
|
||||
/*
|
||||
* savectx(pcb)
|
||||
|
|
Loading…
Reference in New Issue