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

[Xen-changelog] Fix fixed-point long multiplication used in time delta



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID f069a06e650f773a7eba6ecf19fe30c241db5dc2
# Parent  5e5ae834095691ec677fcaaf11e9b16fcaeb76ed
Fix fixed-point long multiplication used in time delta
calculations. The carry flag was clobbered before it was
added to the result.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 5e5ae8340956 -r f069a06e650f 
linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Wed Sep 28 20:06:49 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c  Wed Sep 28 21:18:30 2005
@@ -186,8 +186,8 @@
                "mov  %4,%%eax ; "
                "mov  %%edx,%4 ; "
                "mul  %5       ; "
+               "xor  %5,%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) );
diff -r 5e5ae8340956 -r f069a06e650f xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Wed Sep 28 20:06:49 2005
+++ b/xen/arch/x86/time.c       Wed Sep 28 21:18:30 2005
@@ -119,8 +119,8 @@
         "mov  %4,%%eax ; "
         "mov  %%edx,%4 ; "
         "mul  %5       ; "
+        "xor  %5,%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) );

_______________________________________________
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®.