|
@@ -37,7 +37,7 @@ ENTRY(copy_user_generic_unrolled)
|
|
|
movl %edx,%ecx
|
|
|
andl $63,%edx
|
|
|
shrl $6,%ecx
|
|
|
- jz 17f
|
|
|
+ jz .L_copy_short_string
|
|
|
1: movq (%rsi),%r8
|
|
|
2: movq 1*8(%rsi),%r9
|
|
|
3: movq 2*8(%rsi),%r10
|
|
@@ -58,7 +58,8 @@ ENTRY(copy_user_generic_unrolled)
|
|
|
leaq 64(%rdi),%rdi
|
|
|
decl %ecx
|
|
|
jnz 1b
|
|
|
-17: movl %edx,%ecx
|
|
|
+.L_copy_short_string:
|
|
|
+ movl %edx,%ecx
|
|
|
andl $7,%edx
|
|
|
shrl $3,%ecx
|
|
|
jz 20f
|
|
@@ -174,6 +175,8 @@ EXPORT_SYMBOL(copy_user_generic_string)
|
|
|
*/
|
|
|
ENTRY(copy_user_enhanced_fast_string)
|
|
|
ASM_STAC
|
|
|
+ cmpl $64,%edx
|
|
|
+ jb .L_copy_short_string /* less then 64 bytes, avoid the costly 'rep' */
|
|
|
movl %edx,%ecx
|
|
|
1: rep
|
|
|
movsb
|