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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [avx-check.h] - Blame information for rev 318

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
#include <stdlib.h>
2
#include "cpuid.h"
3
#include "m256-check.h"
4
 
5
static void avx_test (void);
6
 
7
static void
8
__attribute__ ((noinline))
9
do_test (void)
10
{
11
  avx_test ();
12
}
13
 
14
int
15
main ()
16
{
17
  unsigned int eax, ebx, ecx, edx;
18
 
19
  if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
20
    return 0;
21
 
22
  /* Run AVX test only if host has AVX support.  */
23
  if (ecx & bit_AVX)
24
    {
25
      do_test ();
26
#ifdef DEBUG
27
      printf ("PASSED\n");
28
#endif
29
    }
30
#ifdef DEBUG
31
  else
32
    printf ("SKIPPED\n");
33
#endif
34
 
35
  return 0;
36
}

powered by: WebSVN 2.1.0

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