From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH 4/4] x86/memcpy: Reduce code size Date: Tue, 2 Jun 2015 15:04:27 +0100 Message-ID: <1433253867-29752-5-git-send-email-andrew.cooper3@citrix.com> References: <1433253867-29752-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433253867-29752-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org 'n % BYTES_PER_LONG' is at most 7, and doesn't need a 64bit register mov. Signed-off-by: Andrew Cooper CC: Jan Beulich --- Admittedly very trivial, but no need to be wasteful --- xen/arch/x86/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/string.c b/xen/arch/x86/string.c index 3af0ea8..043ae66 100644 --- a/xen/arch/x86/string.c +++ b/xen/arch/x86/string.c @@ -15,7 +15,7 @@ void *memcpy(void *dest, const void *src, size_t n) asm volatile ( " rep ; movs"__OS" ; " - " mov %4,%3 ; " + " mov %k4,%k3 ; " " rep ; movsb " : "=&c" (d0), "=&D" (d1), "=&S" (d2) : "0" (n/BYTES_PER_LONG), "r" (n%BYTES_PER_LONG), "1" (dest), "2" (src) -- 1.7.10.4