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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [eh/] [check-vect.h] - Rev 801

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

/* Check if system supports SIMD.  Copied from gcc.dg/vect/tree-vect.h.  */
#include <signal.h>
 
extern "C" void abort (void);
extern "C" void exit (int);
 
void
sig_ill_handler (int sig)
{
  exit(0);
}
 
void check_vect (void)
{
  signal(SIGILL, sig_ill_handler);
#if defined(__i386__) || defined(__x86_64__)
  /* SSE2 instruction: movsd %xmm0,%xmm0 */
  asm volatile (".byte 0xf2,0x0f,0x10,0xc0");
#elif defined(__sparc__)
  asm volatile (".word\t0x81b007c0");
#endif
  signal (SIGILL, SIG_DFL);
}
 

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

powered by: WebSVN 2.1.0

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