Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/i386/i386 Use single movl instruction rather than p...



details:   https://anonhg.NetBSD.org/src/rev/93b4b2d42e15
branches:  trunk
changeset: 537639:93b4b2d42e15
user:      junyoung <junyoung%NetBSD.org@localhost>
date:      Fri Oct 04 03:20:59 2002 +0000

description:
Use single movl instruction rather than pushl/popl pair.

diffstat:

 sys/arch/i386/i386/locore.s |  37 +++++++++++++++++--------------------
 1 files changed, 17 insertions(+), 20 deletions(-)

diffs (103 lines):

diff -r 86aa48af989f -r 93b4b2d42e15 sys/arch/i386/i386/locore.s
--- a/sys/arch/i386/i386/locore.s       Fri Oct 04 03:17:37 2002 +0000
+++ b/sys/arch/i386/i386/locore.s       Fri Oct 04 03:20:59 2002 +0000
@@ -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(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 @@
        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(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 @@
        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 @@
        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 @@
        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 @@
 /* LINTSTUB: Ignore */
 NENTRY(copy_fault)
        GET_CURPCB(%edx)
-       popl    PCB_ONFAULT(%edx)
+       movl    $0,PCB_ONFAULT(%edx)
        popl    %edi
        popl    %esi
        ret



Home | Main Index | Thread Index | Old Index