Date: Mon, 2 May 2011 13:11:21 -0400 From: Jung-uk Kim <jkim@FreeBSD.org> To: Dimitry Andric <dim@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 Message-ID: <201105021311.24782.jkim@FreeBSD.org> In-Reply-To: <4DBE90A3.50102@FreeBSD.org> References: <201104291820.p3TIKCv7009883@svn.freebsd.org> <4DBE90A3.50102@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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)" > ^ > <inline asm>: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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105021311.24782.jkim>