OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [vect/] [tree-vect.h] - Blame information for rev 823

Go to most recent revision | Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.