aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2013-11-20 15:50:51 -0500
committerH. Peter Anvin <hpa@linux.intel.com>2013-11-20 16:57:07 -0500
commit661c80192d21269c7fc566f1d547510b0c867677 (patch)
treeb0560d5e4a13b708cd10d17012a2a5bf6ddbf4d3 /arch/x86/lib
parentf4cb1cc18f364d761d5614eb6293cccc6647f259 (diff)
x86-64, copy_user: Use leal to produce 32-bit results
When we are using lea to produce a 32-bit result, we can use the leal form, rather than using leaq and worry about truncation elsewhere. Make the leal explicit, both to be more obvious and since that is what gcc generates and thus is less likely to trigger obscure gas bugs. Cc: Fenghua Yu <fenghua.yu@intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Link: http://lkml.kernel.org/r/1384634221-6006-1-git-send-email-fenghua.yu@intel.com Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/copy_user_64.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
index ffe4eb9f09eb..dee945d55594 100644
--- a/arch/x86/lib/copy_user_64.S
+++ b/arch/x86/lib/copy_user_64.S
@@ -186,7 +186,7 @@ ENTRY(copy_user_generic_unrolled)
18630: shll $6,%ecx 18630: shll $6,%ecx
187 addl %ecx,%edx 187 addl %ecx,%edx
188 jmp 60f 188 jmp 60f
18940: lea (%rdx,%rcx,8),%rdx 18940: leal (%rdx,%rcx,8),%edx
190 jmp 60f 190 jmp 60f
19150: movl %ecx,%edx 19150: movl %ecx,%edx
19260: jmp copy_user_handle_tail /* ecx is zerorest also */ 19260: jmp copy_user_handle_tail /* ecx is zerorest also */
@@ -252,7 +252,7 @@ ENTRY(copy_user_generic_string)
252 ret 252 ret
253 253
254 .section .fixup,"ax" 254 .section .fixup,"ax"
25511: lea (%rdx,%rcx,8),%rcx 25511: leal (%rdx,%rcx,8),%ecx
25612: movl %ecx,%edx /* ecx is zerorest also */ 25612: movl %ecx,%edx /* ecx is zerorest also */
257 jmp copy_user_handle_tail 257 jmp copy_user_handle_tail
258 .previous 258 .previous