WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] linux/x86-64: don't use explicit move

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] linux/x86-64: don't use explicit moves in 4- and 5-argument hypercall macros
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Jan 2008 07:40:19 -0800
Delivery-date: Tue, 29 Jan 2008 07:40:59 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1201607590 0
# Node ID 2db30156cb5b4450c535ddf5d7f099c0de633e5c
# Parent  6157dbf408cf9c50a658eb9fdacfc78ca72bd06a
linux/x86-64: don't use explicit moves in 4- and 5-argument hypercall macros

.., allowing the compiler to schedule the moves earlier or even avoid
an extra move.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 include/asm-x86_64/mach-xen/asm/hypercall.h |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff -r 6157dbf408cf -r 2db30156cb5b include/asm-x86_64/mach-xen/asm/hypercall.h
--- a/include/asm-x86_64/mach-xen/asm/hypercall.h       Mon Jan 28 10:29:58 
2008 +0000
+++ b/include/asm-x86_64/mach-xen/asm/hypercall.h       Tue Jan 29 11:53:10 
2008 +0000
@@ -103,29 +103,29 @@
 #define _hypercall4(type, name, a1, a2, a3, a4)                        \
 ({                                                             \
        long __res, __ign1, __ign2, __ign3;                     \
-       asm volatile (                                          \
-               "movq %7,%%r10; "                               \
+       register long __arg4 asm("r10") = (long)(a4);           \
+       asm volatile (                                          \
                HYPERCALL_STR(name)                             \
                : "=a" (__res), "=D" (__ign1), "=S" (__ign2),   \
-               "=d" (__ign3)                                   \
+                 "=d" (__ign3), "+r" (__arg4)                  \
                : "1" ((long)(a1)), "2" ((long)(a2)),           \
-               "3" ((long)(a3)), "g" ((long)(a4))              \
-               : "memory", "r10" );                            \
+                 "3" ((long)(a3))                              \
+               : "memory" );                                   \
        (type)__res;                                            \
 })
 
 #define _hypercall5(type, name, a1, a2, a3, a4, a5)            \
 ({                                                             \
        long __res, __ign1, __ign2, __ign3;                     \
-       asm volatile (                                          \
-               "movq %7,%%r10; movq %8,%%r8; "                 \
+       register long __arg4 asm("r10") = (long)(a4);           \
+       register long __arg5 asm("r8") = (long)(a5);            \
+       asm volatile (                                          \
                HYPERCALL_STR(name)                             \
                : "=a" (__res), "=D" (__ign1), "=S" (__ign2),   \
-               "=d" (__ign3)                                   \
+                 "=d" (__ign3), "+r" (__arg4), "+r" (__arg5)   \
                : "1" ((long)(a1)), "2" ((long)(a2)),           \
-               "3" ((long)(a3)), "g" ((long)(a4)),             \
-               "g" ((long)(a5))                                \
-               : "memory", "r10", "r8" );                      \
+                 "3" ((long)(a3))                              \
+               : "memory" );                                   \
        (type)__res;                                            \
 })
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] linux/x86-64: don't use explicit moves in 4- and 5-argument hypercall macros, Xen patchbot-linux-2.6.18-xen <=