[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Really fix the x86/64 build. Get rid of push/pop from



# 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.