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] Really fix the x86/64 build. Get rid of push/pop from

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Really fix the x86/64 build. Get rid of push/pop from
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Aug 2005 08:30:10 -0400
Delivery-date: Mon, 08 Aug 2005 12:30:38 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 2360c4d7bb2fd8799aa770d872861bb9fabe7671
# Parent  7d84bc7077363bc72525c01a5ca1baf572ac075a
Really fix the x86/64 build. Get rid of push/pop from
scale_delta().
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 7d84bc707736 -r 2360c4d7bb2f 
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Mon Aug  8 12:07:19 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Mon Aug  8 12:31:04 2005
@@ -173,7 +173,7 @@
 static inline u64 scale_delta(u64 delta, u32 mul_frac, int shift)
 {
        u64 product;
-       u32 tmp;
+       u32 tmp1, tmp2;
 
        if ( shift < 0 )
                delta >>= -shift;
@@ -181,17 +181,15 @@
                delta <<= shift;
 
        __asm__ (
-               "push %%edx    ; "
-               "mul  %3       ; "
-               "pop  %%eax    ; "
-               "push %%edx    ; "
-               "mul  %3       ; "
-               "pop  %3       ; "
-               "add  %3,%%eax ; "
-               "xor  %3,%3    ; "
-               "adc  %3,%%edx ; "
-               : "=A" (product), "=r" (tmp)
-               : "A" (delta), "1" (mul_frac) );
+               "mul  %5       ; "
+               "mov  %4,%%eax ; "
+               "mov  %%edx,%4 ; "
+               "mul  %5       ; "
+               "add  %4,%%eax ; "
+               "xor  %5,%5    ; "
+               "adc  %5,%%edx ; "
+               : "=A" (product), "=r" (tmp1), "=r" (tmp2)
+               : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
 
        return product;
 }
diff -r 7d84bc707736 -r 2360c4d7bb2f xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Mon Aug  8 12:07:19 2005
+++ b/xen/arch/x86/time.c       Mon Aug  8 12:31:04 2005
@@ -103,7 +103,7 @@
 static inline u64 scale_delta(u64 delta, struct time_scale *scale)
 {
     u64 product;
-    u32 tmp;
+    u32 tmp1, tmp2;
 
     if ( scale->shift < 0 )
         delta >>= -scale->shift;
@@ -111,17 +111,15 @@
         delta <<= scale->shift;
 
     __asm__ (
-        "push %%edx    ; "
-        "mul  %3       ; "
-        "pop  %%eax    ; "
-        "push %%edx    ; "
-        "mul  %3       ; "
-        "pop  %3       ; "
-        "add  %3,%%eax ; "
-        "xor  %3,%3    ; "
-        "adc  %3,%%edx ; "
-        : "=A" (product), "=r" (tmp)
-        : "A" (delta), "1" (scale->mul_frac) );
+        "mul  %5       ; "
+        "mov  %4,%%eax ; "
+        "mov  %%edx,%4 ; "
+        "mul  %5       ; "
+        "add  %4,%%eax ; "
+        "xor  %5,%5    ; "
+        "adc  %5,%%edx ; "
+        : "=A" (product), "=r" (tmp1), "=r" (tmp2)
+        : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (scale->mul_frac) );
 
     return product;
 }

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Really fix the x86/64 build. Get rid of push/pop from, Xen patchbot -unstable <=