diff options
author | jake <jake@FreeBSD.org> | 2000-12-08 21:31:52 +0000 |
---|---|---|
committer | jake <jake@FreeBSD.org> | 2000-12-08 21:31:52 +0000 |
commit | a212ca690ee57ac3a213419e671a78b6e1dc5a4f (patch) | |
tree | 492a5c754bac2b35a5681135cfe58fb0577c41a2 /sys | |
parent | 83ea67fe2749f70abec2be65abf4a075010661e5 (diff) | |
download | FreeBSD-src-a212ca690ee57ac3a213419e671a78b6e1dc5a4f.zip FreeBSD-src-a212ca690ee57ac3a213419e671a78b6e1dc5a4f.tar.gz |
Revert the previous change I made to cpu_switch. It doesn't help as
much as I thought it would and according to bde was a pessimization.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/amd64/amd64/cpu_switch.S | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/swtch.s | 6 | ||||
-rw-r--r-- | sys/amd64/amd64/vm_machdep.c | 2 | ||||
-rw-r--r-- | sys/i386/i386/swtch.s | 6 | ||||
-rw-r--r-- | sys/i386/i386/vm_machdep.c | 2 |
5 files changed, 14 insertions, 8 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index f19a7fb..2d315fc 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -103,7 +103,8 @@ ENTRY(cpu_switch) movl P_ADDR(%ecx),%edx - popl PCB_EIP(%edx) /* Hardware registers */ + movl (%esp),%eax /* Hardware registers */ + movl %eax,PCB_EIP(%edx) movl %ebx,PCB_EBX(%edx) movl %esp,PCB_ESP(%edx) movl %ebp,PCB_EBP(%edx) @@ -253,7 +254,8 @@ sw1b: movl PCB_EBP(%edx),%ebp movl PCB_ESI(%edx),%esi movl PCB_EDI(%edx),%edi - pushl PCB_EIP(%edx) + movl PCB_EIP(%edx),%eax + movl %eax,(%esp) #ifdef SMP #ifdef GRAB_LOPRIO /* hold LOPRIO for INTs */ diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s index f19a7fb..2d315fc 100644 --- a/sys/amd64/amd64/swtch.s +++ b/sys/amd64/amd64/swtch.s @@ -103,7 +103,8 @@ ENTRY(cpu_switch) movl P_ADDR(%ecx),%edx - popl PCB_EIP(%edx) /* Hardware registers */ + movl (%esp),%eax /* Hardware registers */ + movl %eax,PCB_EIP(%edx) movl %ebx,PCB_EBX(%edx) movl %esp,PCB_ESP(%edx) movl %ebp,PCB_EBP(%edx) @@ -253,7 +254,8 @@ sw1b: movl PCB_EBP(%edx),%ebp movl PCB_ESI(%edx),%esi movl PCB_EDI(%edx),%edi - pushl PCB_EIP(%edx) + movl PCB_EIP(%edx),%eax + movl %eax,(%esp) #ifdef SMP #ifdef GRAB_LOPRIO /* hold LOPRIO for INTs */ diff --git a/sys/amd64/amd64/vm_machdep.c b/sys/amd64/amd64/vm_machdep.c index befe6fe..294a583 100644 --- a/sys/amd64/amd64/vm_machdep.c +++ b/sys/amd64/amd64/vm_machdep.c @@ -168,7 +168,7 @@ cpu_fork(p1, p2, flags) pcb2->pcb_edi = 0; pcb2->pcb_esi = (int)fork_return; /* fork_trampoline argument */ pcb2->pcb_ebp = 0; - pcb2->pcb_esp = (int)p2->p_md.md_regs; + pcb2->pcb_esp = (int)p2->p_md.md_regs - sizeof(void *); pcb2->pcb_ebx = (int)p2; /* fork_trampoline argument */ pcb2->pcb_eip = (int)fork_trampoline; /* diff --git a/sys/i386/i386/swtch.s b/sys/i386/i386/swtch.s index f19a7fb..2d315fc 100644 --- a/sys/i386/i386/swtch.s +++ b/sys/i386/i386/swtch.s @@ -103,7 +103,8 @@ ENTRY(cpu_switch) movl P_ADDR(%ecx),%edx - popl PCB_EIP(%edx) /* Hardware registers */ + movl (%esp),%eax /* Hardware registers */ + movl %eax,PCB_EIP(%edx) movl %ebx,PCB_EBX(%edx) movl %esp,PCB_ESP(%edx) movl %ebp,PCB_EBP(%edx) @@ -253,7 +254,8 @@ sw1b: movl PCB_EBP(%edx),%ebp movl PCB_ESI(%edx),%esi movl PCB_EDI(%edx),%edi - pushl PCB_EIP(%edx) + movl PCB_EIP(%edx),%eax + movl %eax,(%esp) #ifdef SMP #ifdef GRAB_LOPRIO /* hold LOPRIO for INTs */ diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index befe6fe..294a583 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -168,7 +168,7 @@ cpu_fork(p1, p2, flags) pcb2->pcb_edi = 0; pcb2->pcb_esi = (int)fork_return; /* fork_trampoline argument */ pcb2->pcb_ebp = 0; - pcb2->pcb_esp = (int)p2->p_md.md_regs; + pcb2->pcb_esp = (int)p2->p_md.md_regs - sizeof(void *); pcb2->pcb_ebx = (int)p2; /* fork_trampoline argument */ pcb2->pcb_eip = (int)fork_trampoline; /* |