From: "Jan Beulich" Subject: Re: [PATCH 2/2] x86emul: simplify asm() constraints Date: Thu, 12 Mar 2015 10:55:52 +0000 Message-ID: <55017EC80200007800068E5E@mail.emea.novell.com> References: <54FF2A50020000780006838B@mail.emea.novell.com> <54FF2B9402000078000683B8@mail.emea.novell.com> <20150312104240.GA22164@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YW0mQ-00055M-Gn for xen-devel@lists.xenproject.org; Thu, 12 Mar 2015 10:55:54 +0000 In-Reply-To: <20150312104240.GA22164@deinos.phlegethon.org> 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: Andrew Cooper , Keir Fraser , xen-devel List-Id: xen-devel@lists.xenproject.org >>> On 12.03.15 at 11:42, wrote: > At 16:36 +0000 on 10 Mar (1426001780), Jan Beulich wrote: >> @@ -806,9 +802,9 @@ static int read_ulong( >> static bool_t mul_dbl(unsigned long m[2]) >> { >> bool_t rc; >> - asm ( "mul %4; seto %b2" >> - : "=a" (m[0]), "=d" (m[1]), "=q" (rc) >> - : "0" (m[0]), "1" (m[1]), "2" (0) ); >> + asm ( "mul %1; seto %b2" >> + : "+a" (m[0]), "+d" (m[1]), "=q" (rc) >> + : "2" (0) ); > > Would 'bool_t rc = 0' allow you to switch operand 2 to +q and drop the > last input operand as well? Yes. > Or did that also produce worse code? I didn't try yet, but I can't see why it would. Jan