aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Deegan <tim@xen.org>2013-08-16 12:07:40 +0200
committerJan Beulich <jbeulich@suse.com>2013-08-16 12:07:40 +0200
commitfb7d38de1f6744092011ae169b12f5e31ba6a745 (patch)
tree890625be862480f7426848a8c7eb69d02fab3713
parent9990231d0d5abf48574f8ec3d2464e2e3da98891 (diff)
downloadxen-fb7d38de1f6744092011ae169b12f5e31ba6a745.tar.gz
xen-fb7d38de1f6744092011ae169b12f5e31ba6a745.tar.bz2
xen-fb7d38de1f6744092011ae169b12f5e31ba6a745.zip
x86: explicit suffix in inline assembler (for clang).
This fixes the clang build, and has no effect on gcc's output. Signed-off-by: Tim Deegan <tim@xen.org> Committed-by: Jan Beulich <jbeulich@suse.com> master commit: 59a28b5f045331641cbf0c1fc8d5d67afe328939 master date: 2013-02-14 14:20:06 +0100 Note that this isn't just a build fix - if the "delta" input in the 64-bit variant ends up in memory, gas would default to 32-bit operand size (and should really warn about the ambiguity). 32-bit portion contributed by NetBSD folks.
-rw-r--r--xen/arch/x86/time.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 7d29cd8737..9187520101 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -131,10 +131,10 @@ static inline u64 scale_delta(u64 delta, struct time_scale *scale)
#ifdef CONFIG_X86_32
asm (
- "mul %5 ; "
+ "mull %5 ; "
"mov %4,%%eax ; "
"mov %%edx,%4 ; "
- "mul %5 ; "
+ "mull %5 ; "
"xor %5,%5 ; "
"add %4,%%eax ; "
"adc %5,%%edx ; "
@@ -142,7 +142,7 @@ static inline u64 scale_delta(u64 delta, struct time_scale *scale)
: "a" ((u32)delta), "1" ((u32)(delta >> 32)), "2" (scale->mul_frac) );
#else
asm (
- "mul %2 ; shrd $32,%1,%0"
+ "mulq %2 ; shrd $32,%1,%0"
: "=a" (product), "=d" (delta)
: "rm" (delta), "0" ((u64)scale->mul_frac) );
#endif