Subject: Re: Runtime Altivec detection

From: Hollis Blanchard <[email-masked]>
Date: Fri, 7 Mar 2003 20:11:53 -0600

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/