From owner-svn-src-all@FreeBSD.ORG Mon May 2 11:08:20 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89CBE106566B; Mon, 2 May 2011 11:08:20 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 49D528FC29; Mon, 2 May 2011 11:08:20 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:a950:cfe0:24ac:52fd] (unknown [IPv6:2001:7b8:3a7:0:a950:cfe0:24ac:52fd]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 812165C59; Mon, 2 May 2011 13:08:19 +0200 (CEST) Message-ID: <4DBE90A3.50102@FreeBSD.org> Date: Mon, 02 May 2011 13:08:19 +0200 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110415 Lanikai/3.1.11pre MIME-Version: 1.0 To: Jung-uk Kim References: <201104291820.p3TIKCv7009883@svn.freebsd.org> In-Reply-To: <201104291820.p3TIKCv7009883@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 May 2011 11:08:20 -0000 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");