summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1996-05-01 03:47:04 +0000
committerbde <bde@FreeBSD.org>1996-05-01 03:47:04 +0000
commit789804f74610f0b0fd1d15b3b2ed4b437927b3e9 (patch)
treee6e6bb44a5c06420d6e9059b17f5f3e77e10f110 /sys/amd64
parent8ff8e22ec95aa1d8307afe8f246db5e8c4a95ee2 (diff)
downloadFreeBSD-src-789804f74610f0b0fd1d15b3b2ed4b437927b3e9.zip
FreeBSD-src-789804f74610f0b0fd1d15b3b2ed4b437927b3e9.tar.gz
Don't return unused values in cpu_switch() or savectx().
Don't preserve unused registers in the NPX case in savectx().
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/cpu_switch.S8
-rw-r--r--sys/amd64/amd64/swtch.s8
-rw-r--r--sys/amd64/include/pcb.h4
3 files changed, 6 insertions, 14 deletions
diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S
index 8a20aa9..ee4be15 100644
--- a/sys/amd64/amd64/cpu_switch.S
+++ b/sys/amd64/amd64/cpu_switch.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.33 1996/04/18 21:34:26 phk Exp $
+ * $Id: swtch.s,v 1.34 1996/04/25 06:20:08 phk Exp $
*/
#include "apm.h"
@@ -461,7 +461,6 @@ swtch_com:
2:
#endif
- movl $0,%eax
sti
ret
@@ -506,22 +505,19 @@ ENTRY(savectx)
pushl %eax
pushl %eax
call _npxsave
- popl %eax
+ addl $4,%esp
popl %eax
popl %ecx
- pushl %ecx
pushl $PCB_SAVEFPU_SIZE
leal PCB_SAVEFPU(%ecx),%ecx
pushl %ecx
pushl %eax
call _bcopy
addl $12,%esp
- popl %ecx
#endif /* NNPX > 0 */
1:
- xorl %eax,%eax /* return 0 */
ret
/*
diff --git a/sys/amd64/amd64/swtch.s b/sys/amd64/amd64/swtch.s
index 8a20aa9..ee4be15 100644
--- a/sys/amd64/amd64/swtch.s
+++ b/sys/amd64/amd64/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.33 1996/04/18 21:34:26 phk Exp $
+ * $Id: swtch.s,v 1.34 1996/04/25 06:20:08 phk Exp $
*/
#include "apm.h"
@@ -461,7 +461,6 @@ swtch_com:
2:
#endif
- movl $0,%eax
sti
ret
@@ -506,22 +505,19 @@ ENTRY(savectx)
pushl %eax
pushl %eax
call _npxsave
- popl %eax
+ addl $4,%esp
popl %eax
popl %ecx
- pushl %ecx
pushl $PCB_SAVEFPU_SIZE
leal PCB_SAVEFPU(%ecx),%ecx
pushl %ecx
pushl %eax
call _bcopy
addl $12,%esp
- popl %ecx
#endif /* NNPX > 0 */
1:
- xorl %eax,%eax /* return 0 */
ret
/*
diff --git a/sys/amd64/include/pcb.h b/sys/amd64/include/pcb.h
index 519730f..fdcedcf 100644
--- a/sys/amd64/include/pcb.h
+++ b/sys/amd64/include/pcb.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)pcb.h 5.10 (Berkeley) 5/12/91
- * $Id: pcb.h,v 1.13 1996/04/19 07:28:04 phk Exp $
+ * $Id: pcb.h,v 1.14 1996/04/25 06:20:19 phk Exp $
*/
#ifndef _I386_PCB_H_
@@ -79,7 +79,7 @@ struct md_coredump {
#ifdef KERNEL
extern struct pcb *curpcb; /* our current running pcb */
-int savectx __P((struct pcb*));
+void savectx __P((struct pcb*));
#endif
#endif /* _I386_PCB_H_ */
OpenPOWER on IntegriCloud