From owner-svn-src-head@FreeBSD.ORG Mon May 2 17:11:38 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 359721065670; Mon, 2 May 2011 17:11:38 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: Dimitry Andric Date: Mon, 2 May 2011 13:11:21 -0400 User-Agent: KMail/1.6.2 References: <201104291820.p3TIKCv7009883@svn.freebsd.org> <4DBE90A3.50102@FreeBSD.org> In-Reply-To: <4DBE90A3.50102@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201105021311.24782.jkim@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r221214 - head/sys/x86/x86 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 17:11:38 -0000 On Monday 02 May 2011 07:08 am, Dimitry Andric wrote: > On 2011-04-29 20:20, Jung-uk Kim wrote: > ... > > > +static __inline void > > +vmware_hvcall(u_int cmd, u_int *p) > > +{ > > + > > + __asm __volatile("inl (%%dx)" > > + : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > > + : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" > > (VMW_HVPORT) + : "memory"); > > +} > > This upsets clang's integrated assembler, and I think it's right in > this case: > > sys/x86/x86/tsc.c:103:19: error: invalid operand for instruction > __asm __volatile("inl (%%dx)" > ^ > :1:6: note: instantiated into assembly here > inl (%dx) > ^ > > Can we please add an explicit %%eax as second argument here? E.g.: > > diff --git a/sys/x86/x86/tsc.c b/sys/x86/x86/tsc.c > index 0b7510c..9638167 100644 > --- a/sys/x86/x86/tsc.c > +++ b/sys/x86/x86/tsc.c > @@ -100,7 +100,7 @@ static __inline void > vmware_hvcall(u_int cmd, u_int *p) > { > > - __asm __volatile("inl (%%dx)" > + __asm __volatile("inl (%%dx), %%eax" > > : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) > : "0" (VMW_HVMAGIC), "1" (UINT_MAX), "2" (cmd), "3" (VMW_HVPORT) > : "memory"); Fixed in r221331. Sorry for the breakage. Jung-uk Kim