ia64/xen-unstable

changeset 7124:f069a06e650f

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@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Wed Sep 28 22:18:30 2005 +0100 (2005-09-28)
parents 5e5ae8340956
children e04b0805febb
files linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c xen/arch/x86/time.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Wed Sep 28 21:06:49 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/time.c	Wed Sep 28 22:18:30 2005 +0100
     1.3 @@ -186,8 +186,8 @@ static inline u64 scale_delta(u64 delta,
     1.4  		"mov  %4,%%eax ; "
     1.5  		"mov  %%edx,%4 ; "
     1.6  		"mul  %5       ; "
     1.7 +		"xor  %5,%5    ; "
     1.8  		"add  %4,%%eax ; "
     1.9 -		"xor  %5,%5    ; "
    1.10  		"adc  %5,%%edx ; "
    1.11  		: "=A" (product), "=r" (tmp1), "=r" (tmp2)
    1.12  		: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (mul_frac) );
     2.1 --- a/xen/arch/x86/time.c	Wed Sep 28 21:06:49 2005 +0100
     2.2 +++ b/xen/arch/x86/time.c	Wed Sep 28 22:18:30 2005 +0100
     2.3 @@ -119,8 +119,8 @@ static inline u64 scale_delta(u64 delta,
     2.4          "mov  %4,%%eax ; "
     2.5          "mov  %%edx,%4 ; "
     2.6          "mul  %5       ; "
     2.7 +        "xor  %5,%5    ; "
     2.8          "add  %4,%%eax ; "
     2.9 -        "xor  %5,%5    ; "
    2.10          "adc  %5,%%edx ; "
    2.11          : "=A" (product), "=r" (tmp1), "=r" (tmp2)
    2.12          : "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (scale->mul_frac) );