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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [ext/] [altivec_check.h] - Rev 832

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

/* A runtime check for AltiVec capability.  */
/* Contributed by Ziemowit Laski  <zlaski@apple.com>  */
 
#include <signal.h>
extern
#ifdef __cplusplus
"C"
#endif
void exit(int);
 
void 
sig_ill_handler (int sig)
{
    exit (0);
}
 
void altivec_check(void) {
 
  /* Exit on systems without AltiVec.  */
  signal (SIGILL, sig_ill_handler);
#ifdef __MACH__
  asm volatile ("vor v0,v0,v0");
#else
  asm volatile ("vor 0,0,0");
#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.