Commit 48b5259c authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'x86-asm-for-linus' of git://

Pull x86 asm updates from Ingo Molnar:
 "A single commit micro-optimizing short user copies on certain Intel

* 'x86-asm-for-linus' of git://
  x86/uaccess: Optimize copy_user_enhanced_fast_string() for short strings
parents 2a275382 236222d3
......@@ -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
movl %edx,%ecx
andl $7,%edx
shrl $3,%ecx
jz 20f
......@@ -174,6 +175,8 @@ EXPORT_SYMBOL(copy_user_generic_string)
cmpl $64,%edx
jb .L_copy_short_string /* less then 64 bytes, avoid the costly 'rep' */
movl %edx,%ecx
1: rep
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment