Use single movl instruction rather than pushl/popl pair.
This commit is contained in:
parent
8b656df79c
commit
8ab9e2ef57
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.261 2002/10/01 12:56:55 fvdl Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.262 2002/10/04 03:20:59 junyoung Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -980,11 +980,10 @@ ENTRY(copyout)
|
||||
ENTRY(i386_copyout)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
pushl $0
|
||||
|
||||
movl 16(%esp),%esi
|
||||
movl 20(%esp),%edi
|
||||
movl 24(%esp),%eax
|
||||
movl 12(%esp),%esi
|
||||
movl 16(%esp),%edi
|
||||
movl 20(%esp),%eax
|
||||
|
||||
/*
|
||||
* We check that the end of the destination buffer is not past the end
|
||||
@ -1058,10 +1057,10 @@ ENTRY(i386_copyout)
|
||||
rep
|
||||
movsb
|
||||
|
||||
popl PCB_ONFAULT(%edx)
|
||||
xorl %eax,%eax
|
||||
popl %edi
|
||||
popl %esi
|
||||
xorl %eax,%eax
|
||||
popl %eax,PCB_ONFAULT(%edx)
|
||||
ret
|
||||
#endif /* I386_CPU */
|
||||
|
||||
@ -1070,11 +1069,10 @@ ENTRY(i386_copyout)
|
||||
ENTRY(i486_copyout)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
pushl $0
|
||||
|
||||
movl 16(%esp),%esi
|
||||
movl 20(%esp),%edi
|
||||
movl 24(%esp),%eax
|
||||
movl 12(%esp),%esi
|
||||
movl 16(%esp),%edi
|
||||
movl 20(%esp),%eax
|
||||
|
||||
/*
|
||||
* We check that the end of the destination buffer is not past the end
|
||||
@ -1100,10 +1098,10 @@ ENTRY(i486_copyout)
|
||||
rep
|
||||
movsb
|
||||
|
||||
popl PCB_ONFAULT(%edx)
|
||||
xorl %eax,%eax
|
||||
popl %edi
|
||||
popl %esi
|
||||
xorl %eax,%eax
|
||||
movl %eax,PCB_ONFAULT(%edx)
|
||||
ret
|
||||
#endif /* I486_CPU || I586_CPU || I686_CPU */
|
||||
|
||||
@ -1123,12 +1121,11 @@ ENTRY(i386_copyin)
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
GET_CURPCB(%eax)
|
||||
pushl $0
|
||||
movl $_C_LABEL(copy_fault),PCB_ONFAULT(%eax)
|
||||
|
||||
movl 16(%esp),%esi
|
||||
movl 20(%esp),%edi
|
||||
movl 24(%esp),%eax
|
||||
movl 12(%esp),%esi
|
||||
movl 16(%esp),%edi
|
||||
movl 20(%esp),%eax
|
||||
|
||||
/*
|
||||
* We check that the end of the destination buffer is not past the end
|
||||
@ -1153,10 +1150,10 @@ ENTRY(i386_copyin)
|
||||
movsb
|
||||
|
||||
GET_CURPCB(%edx)
|
||||
popl PCB_ONFAULT(%edx)
|
||||
xorl %eax,%eax
|
||||
popl %edi
|
||||
popl %esi
|
||||
xorl %eax,%eax
|
||||
movl %eax,PCB_ONFAULT(%edx)
|
||||
ret
|
||||
#endif /* I386_CPU || I486_CPU || I586_CPU || I686_CPU */
|
||||
|
||||
@ -1167,7 +1164,7 @@ NENTRY(copy_efault)
|
||||
/* LINTSTUB: Ignore */
|
||||
NENTRY(copy_fault)
|
||||
GET_CURPCB(%edx)
|
||||
popl PCB_ONFAULT(%edx)
|
||||
movl $0,PCB_ONFAULT(%edx)
|
||||
popl %edi
|
||||
popl %esi
|
||||
ret
|
||||
|
Loading…
Reference in New Issue
Block a user