Runtime Altivec detection

Hollis Blanchard hollis at austin.ibm.com
Sat Mar 8 13:11:53 EST 2003


On Friday 07 March 2003 08:02 pm, Bill Fink wrote:
>
> Here is the code xine uses to do run time Altivec detection
> (from xine-utils/cpu_accel.c):
>
> #if defined (ARCH_PPC) && defined (ENABLE_ALTIVEC)
> static sigjmp_buf jmpbuf;
> static volatile sig_atomic_t canjump = 0;
>
> static void sigill_handler (int sig)
[snip]

Compared to testing the CPU feature bits supplied by the kernel (for a long
time now; Ben could tell you exactly how long) this method seems *extremely*
messy. Please see my other posts (and Ben's) in this thread for details.

-Hollis
--
IBM Linux Technology Center

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-dev mailing list