OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

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

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

powered by: WebSVN 2.1.0

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