Subject: Re: Checking for CPU feature from userland
To: None <port-i386@netbsd.org>
From: Matthias Scheler <tron@zhadum.de>
List: port-i386
Date: 04/22/2001 09:59:52
On Sun, Apr 22, 2001 at 12:57:37AM -0700, Ross Harvey wrote:
> > How can I query this information from an userland program to check if
> > it can use MMX?
> 
> You use the `cpuid' instruction.  There is free pdf documentation for
> x86 on the intel web site.

The "cpuid" instruction is not available on all x86 CPUs and it is not
easy to use. I would prefer something like a sysctl(3) variable.

	Kind regards

-- 
Matthias Scheler                                         http://core.de/~tron/