svn commit: r230262 - head/sys/amd64/include

Bruce Evans brde at optusnet.com.au
Tue Jan 17 12:50:23 UTC 2012


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


More information about the svn-src-all mailing list