From: "Jan Beulich" Subject: Re: [PATCH] x86: explicit suffix in inline assembler (for clang) Date: Thu, 14 Feb 2013 13:18:29 +0000 Message-ID: <511CF23502000078000BE414@nat28.tlf.novell.com> References: <500907997cb7b9c69731.1360846324@whitby.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <500907997cb7b9c69731.1360846324@whitby.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Tim Deegan Cc: xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org >>> On 14.02.13 at 13:52, Tim Deegan wrote: > # HG changeset patch > # User Tim Deegan > # Date 1360846113 0 > # Node ID 500907997cb7b9c6973147d56cfd8a1a4c136c7e > # Parent 4b01cc2c2c1f4836e7fb34a58bc13e125d67969e > 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 > > diff -r 4b01cc2c2c1f -r 500907997cb7 xen/arch/x86/time.c > --- a/xen/arch/x86/time.c Thu Feb 14 12:36:01 2013 +0000 > +++ b/xen/arch/x86/time.c Thu Feb 14 12:48:33 2013 +0000 > @@ -127,7 +127,7 @@ static inline u64 scale_delta(u64 delta, > delta <<= scale->shift; > > asm ( > - "mul %2 ; shrd $32,%1,%0" > + "mulq %2 ; shrd $32,%1,%0" > : "=a" (product), "=d" (delta) > : "rm" (delta), "0" ((u64)scale->mul_frac) ); > I'll commit this as being benign, but what the heck? "mul" needs a suffix but "shrd" doesn't? Jan