diff options
| -rw-r--r-- | sys/i386/i386/machdep.c | 4 | ||||
| -rw-r--r-- | sys/i386/i386/swtch.s | 29 | ||||
| -rw-r--r-- | sys/i386/i386/vm_machdep.c | 4 | ||||
| -rw-r--r-- | sys/i386/include/pcb.h | 4 |
4 files changed, 14 insertions, 27 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 1d62f2bb9d77..1de8b9eea5cb 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.128.4.4 1995/10/25 11:14:38 davidg Exp $ + * $Id: machdep.c,v 1.128.4.5 1996/01/13 10:46:27 davidg Exp $ */ #include "npx.h" @@ -890,7 +890,7 @@ boot(howto) } else { if (howto & RB_DUMP) { if (!cold) { - savectx(&dumppcb, 0); + savectx(&dumppcb); dumppcb.pcb_ptd = rcr3(); dumpsys(); } diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index e15298d6d046..daec1ffca2e0 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -33,7 +33,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: swtch.s,v 1.19 1995/01/21 15:20:23 bde Exp $ + * $Id: swtch.s,v 1.20 1995/02/17 02:22:42 phk Exp $ */ #include "npx.h" /* for NNPX */ @@ -504,14 +504,18 @@ ENTRY(mvesp) ret /* - * savectx(pcb, altreturn) - * Update pcb, saving current processor state and arranging - * for alternate return ala longjmp in cpu_switch if altreturn is true. + * savectx(pcb) + * Update pcb, saving current processor state. */ ENTRY(savectx) + /* PCB */ movl 4(%esp),%ecx + + /* caller's return address - child won't execute this routine */ movl (%esp),%eax movl %eax,PCB_EIP(%ecx) + + movl $1,PCB_EAX(%ecx) /* return 1 in child */ movl %ebx,PCB_EBX(%ecx) movl %esp,PCB_ESP(%ecx) movl %ebp,PCB_EBP(%ecx) @@ -553,25 +557,8 @@ ENTRY(savectx) call _bcopy addl $12,%esp popl %ecx -1: #endif /* NNPX > 0 */ - cmpl $0,8(%esp) - je 1f - movl %esp,%edx /* relocate current sp relative to pcb */ - subl $_kstack,%edx /* (sp is relative to kstack): */ - addl %edx,%ecx /* pcb += sp - kstack; */ - movl %eax,(%ecx) /* write return pc at (relocated) sp@ */ - -/* this mess deals with replicating register state gcc hides */ - movl 12(%esp),%eax - movl %eax,12(%ecx) - movl 16(%esp),%eax - movl %eax,16(%ecx) - movl 20(%esp),%eax - movl %eax,20(%ecx) - movl 24(%esp),%eax - movl %eax,24(%ecx) 1: xorl %eax,%eax /* return 0 */ ret diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index 2ff3602015b3..e15586c6183d 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -38,7 +38,7 @@ * * from: @(#)vm_machdep.c 7.3 (Berkeley) 5/13/91 * Utah $Hdr: vm_machdep.c 1.16.1.1 89/06/23$ - * $Id: vm_machdep.c,v 1.38 1995/05/18 09:17:07 davidg Exp $ + * $Id: vm_machdep.c,v 1.39 1995/05/30 07:59:46 rgrimes Exp $ */ #include "npx.h" @@ -575,7 +575,7 @@ cpu_fork(p1, p2) * Arrange for a non-local goto when the new process * is started, to resume here, returning nonzero from setjmp. */ - if (savectx(&up->u_pcb, 1)) { + if (savectx(&up->u_pcb)) { /* * Return 1 in child. */ diff --git a/sys/i386/include/pcb.h b/sys/i386/include/pcb.h index 8ce7febb5ada..537ef5d531bf 100644 --- a/sys/i386/include/pcb.h +++ b/sys/i386/include/pcb.h @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)pcb.h 5.10 (Berkeley) 5/12/91 - * $Id: pcb.h,v 1.7 1994/10/08 22:21:33 phk Exp $ + * $Id: pcb.h,v 1.8 1994/12/03 10:02:55 bde Exp $ */ #ifndef _I386_PCB_H_ @@ -88,7 +88,7 @@ struct md_coredump { #ifdef KERNEL extern struct pcb *curpcb; /* our current running pcb */ -int savectx __P((struct pcb*,int)); +int savectx __P((struct pcb*)); #endif #endif /* _I386_PCB_H_ */ |
