From 4267ece6350fb33dc6c07549759d4eb253d6f951 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 29 Aug 2011 17:38:18 +0200 Subject: Make copyout run in 1 loop on >= i486 * i386/i386/locore.S (copyout): On >= i486, skip WP-check loop split and just use byte count. --- i386/i386/locore.S | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/i386/i386/locore.S b/i386/i386/locore.S index 29c7791..58d5efd 100644 --- a/i386/i386/locore.S +++ b/i386/i386/locore.S @@ -1295,7 +1295,7 @@ Entry(copyoutmsg) copyout_retry: #if !defined(MACH_HYP) && !PAE cmpl $3,machine_slot+SUB_TYPE_CPU_TYPE - ja 0f /* Skip on i486 and above */ + ja 1f /* Skip on i486 and above */ movl %cr3,%ecx /* point to page directory */ movl %edi,%eax /* get page directory bits */ shrl $(PDESHIFT),%eax /* from user address */ @@ -1321,7 +1321,6 @@ copyout_retry: movl %cr3,%eax /* invalidate TLB */ movl %eax,%cr3 0: -#endif /* !defined(MACH_HYP) && !PAE */ /* * Copy only what fits on the current destination page. @@ -1331,9 +1330,11 @@ copyout_retry: andl $(-NBPG),%eax /* start of next page */ subl %edi,%eax /* get number of bytes to that point */ cmpl %edx,%eax /* bigger than count? */ - jle 1f /* if so, */ - movl %edx,%eax /* use count */ + jle 2f /* if so, */ 1: +#endif /* !defined(MACH_HYP) && !PAE */ + movl %edx,%eax /* use count */ +2: /*cld*/ /* count up: always this way in GCC code */ movl %eax,%ecx /* move by longwords first */ -- cgit v1.2.3