Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jan 2012 23:50:18 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Konstantin Belousov <kib@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r230262 - head/sys/amd64/include
Message-ID:  <20120117234437.E2762@besplex.bde.org>
In-Reply-To: <201201170730.q0H7UbGJ073270@svn.freebsd.org>
References:  <201201170730.q0H7UbGJ073270@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Jan 2012, Konstantin Belousov wrote:

> Log:
>  Implement xsetbv(), xsave() and xrstor() providing C access to the
>  similarly named CPU instructions.

Please don't add to the unsorting in this file.

> Modified: head/sys/amd64/include/cpufunc.h
> ==============================================================================
> --- head/sys/amd64/include/cpufunc.h	Tue Jan 17 07:23:43 2012	(r230261)
> +++ head/sys/amd64/include/cpufunc.h	Tue Jan 17 07:30:36 2012	(r230262)
> #else /* !(__GNUCLIKE_ASM && __CC_SUPPORTS___INLINE) */
>
> int	breakpoint(void);
> @@ -733,6 +768,9 @@ u_int	rgs(void);
> void	wbinvd(void);
> void	write_rflags(u_int rf);
> void	wrmsr(u_int msr, uint64_t newval);
> +void	xsetbv(uint32_t reg, uint64_t val);
> +void	xsave(char *addr, uint64_t mask);
> +void	xrstor(char *addr, uint64_t mask);

This matches the order of the inlines, and w < x, but e > a and s > r.

>
> #endif	/* __GNUCLIKE_ASM && __CC_SUPPORTS___INLINE */

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120117234437.E2762>