1 /* A runtime check for AltiVec capability. */
2 /* Contributed by Ziemowit Laski <zlaski@apple.com> */
5 extern void exit (int);
6 extern void abort (void);
9 sig_ill_handler (int sig
)
14 void altivec_check(void) {
16 /* Exit on systems without AltiVec. */
17 signal (SIGILL
, sig_ill_handler
);
19 asm volatile ("vor v0,v0,v0");
21 asm volatile ("vor 0,0,0");
23 signal (SIGILL
, SIG_DFL
);