swtch() --> cpu_switch()

This commit is contained in:
mycroft 1994-05-20 10:31:48 +00:00
parent 076a7d70b4
commit 29da7efedd

View File

@ -37,7 +37,7 @@
*
* from: Utah Hdr: locore.s 1.58 91/04/22
* from: @(#)locore.s 7.11 (Berkeley) 5/9/91
* $Id: locore.s,v 1.18 1994/05/13 00:57:39 mycroft Exp $
* $Id: locore.s,v 1.19 1994/05/20 10:31:48 mycroft Exp $
*/
#include "assym.s"
@ -505,7 +505,7 @@ _lev6intr:
Lnobomb:
cmpl #_kstack+NBPG,sp | are we still in stack pages?
jcc Lstackok | yes, continue normally
tstl _curproc | if !curproc could have swtch_exit'ed,
tstl _curproc | if !curproc could have switch_exited,
jeq Lstackok | might be on tmpstk
tstl _panicstr | have we paniced?
jne Lstackok | yes, do not re-panic
@ -1374,7 +1374,7 @@ Lrem2:
Lrem3:
.asciz "remrq"
Lsw0:
.asciz "swtch"
.asciz "switch"
.even
.globl _curpcb
@ -1395,10 +1395,10 @@ pcbflag:
* and the memory for the pcb+stack has been freed.
* The ipl is high enough to prevent the memory from being reallocated.
*/
ENTRY(swtch_exit)
ENTRY(switch_exit)
movl #nullpcb,_curpcb | save state into garbage pcb
lea tmpstk,sp | goto a tmp stack
jra _swtch
jra _cpu_switch
/*
* When no processes are on the runq, Swtch branches to idle
@ -1431,7 +1431,7 @@ Lbadsw:
* user's PTEs have been changed (formerly denoted by the SPTECHG p_flag
* bit). For now, we just always flush the full ATC.
*/
ENTRY(swtch)
ENTRY(cpu_switch)
movl _curpcb,a0 | current pcb
movw sr,a0@(PCB_PS) | save sr before changing ipl
#ifdef notyet
@ -1500,7 +1500,6 @@ Lsw2:
moveml #0xFCFC,a1@(PCB_REGS) | save non-scratch registers
movl usp,a2 | grab USP (a2 has been saved)
movl a2,a1@(PCB_USP) | and save it
movl _CMAP2,a1@(PCB_CMAP2) | save temporary map PTE
#ifdef FPCOPROC
lea a1@(PCB_FPCTX),a2 | pointer to FP save area
fsave a2@ | save FP state
@ -1597,7 +1596,6 @@ Lnocache1:
movl a1@(PCB_USTP),a0@(MMUUSTP) | context switch
#endif
Lcxswdone:
movl a1@(PCB_CMAP2),_CMAP2 | reload tmp map
moveml a1@(PCB_REGS),#0xFCFC | and registers
movl a1@(PCB_USP),a0
movl a0,usp | and USP
@ -1640,7 +1638,6 @@ ENTRY(savectx)
movl usp,a0 | grab USP
movl a0,a1@(PCB_USP) | and save it
moveml #0xFCFC,a1@(PCB_REGS) | save non-scratch registers
movl _CMAP2,a1@(PCB_CMAP2) | save temporary map PTE
#ifdef FPCOPROC
lea a1@(PCB_FPCTX),a0 | pointer to FP save area
fsave a0@ | save FP state