[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-372474e12a858807f03f73cb30e830a76fd1ae07@git.kernel.org>
Date: Wed, 20 Nov 2013 12:54:35 -0800
From: "tip-bot for H. Peter Anvin" <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...nel.org,
torvalds@...ux-foundation.org, fenghua.yu@...el.com,
tglx@...utronix.de, hpa@...ux.intel.com
Subject: [tip:x86/asm] x86-64, copy_user:
Use leal to produce 32-bit results
Commit-ID: 372474e12a858807f03f73cb30e830a76fd1ae07
Gitweb: http://git.kernel.org/tip/372474e12a858807f03f73cb30e830a76fd1ae07
Author: H. Peter Anvin <hpa@...ux.intel.com>
AuthorDate: Wed, 20 Nov 2013 12:50:51 -0800
Committer: H. Peter Anvin <hpa@...ux.intel.com>
CommitDate: Wed, 20 Nov 2013 12:50:51 -0800
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.
Cc: Fenghua Yu <fenghua.yu@...el.com>
Cc: Linus Torvalds <torvalds@...ux-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@...ux.intel.com>
---
arch/x86/lib/copy_user_64.S | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/lib/copy_user_64.S b/arch/x86/lib/copy_user_64.S
index ffe4eb9..f00a87c 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)
30: shll $6,%ecx
addl %ecx,%edx
jmp 60f
-40: lea (%rdx,%rcx,8),%rdx
+40: lea (%rdx,%rcx,8),%edx
jmp 60f
50: movl %ecx,%edx
60: jmp copy_user_handle_tail /* ecx is zerorest also */
@@ -252,7 +252,7 @@ ENTRY(copy_user_generic_string)
ret
.section .fixup,"ax"
-11: lea (%rdx,%rcx,8),%rcx
+11: lea (%rdx,%rcx,8),%ecx
12: movl %ecx,%edx /* ecx is zerorest also */
jmp copy_user_handle_tail
.previous
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists