diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-29 17:38:18 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-08-29 17:38:18 +0200 |
commit | 4267ece6350fb33dc6c07549759d4eb253d6f951 (patch) | |
tree | ca28497b5073548d553e9a183da840a91ca95e38 /i386 | |
parent | f9d15f9c64abf8f3096e82a4a20133152423d305 (diff) |
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.
Diffstat (limited to 'i386')
-rw-r--r-- | i386/i386/locore.S | 9 |
1 files 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 */ |