blob: f56e83138b3bc31e68d1da2b95817016b3e272a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
/* APPLE LOCAL file lno */
/* Check if system supports SIMD */
#include <signal.h>
extern void exit (int);
extern void abort (void);
void
sig_ill_handler (int sig)
{
exit(0);
}
void check_vect (void)
{
signal(SIGILL, sig_ill_handler);
#if defined(__ppc__) || defined(__ppc64__)
/* Altivec instruction, 'vor %v0,%v0,%v0'. */
asm volatile (".long 0x10000484");
#elif defined(__i386__) || defined(__x86_64__)
/* SSE2 instruction: movsd %xmm0,%xmm0 */
asm volatile (".byte 0xf2,0x0f,0x10,0xc0");
#endif
signal (SIGILL, SIG_DFL);
}
|