Accessing HWCAP on PowerPC?

Benjamin Herrenschmidt benh@kernel.crashing.org
Sat Oct 16 05:41:00 GMT 2004


On Sat, 2004-10-16 at 02:51, Ian Romanick wrote:

> What I'm trying to do is dynamically detect things like VMX to selected 
> optimized routines at run-time in libGL and layered DRI drivers. 
> Parameters passed to main do me no good. :(  I'm currently examining 
> /proc/<pid>/auxv to get the information, but that's specific to 2.6.x 
> Linux kernels.  I'd prefer a solution that will run on 2.4 kernels or BSD.

Well, if glibc exported AT_HWCAP some way, that would work with 2.4
kernels too. If not, then you can do the horrible trick others are
doing which is to install a sigill handler and do a vector instruction,
but I dislike libs that hack signal handlers in the back of their host
applications...

Ben.
 



More information about the Libc-alpha mailing list