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/] [aes-avx-check.h] - Blame information for rev 318

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 aes_avx_test (void);
8
 
9
static void
10
__attribute__ ((noinline))
11
do_test (void)
12
{
13
  aes_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 AES + AVX test only if host has AES + AVX support.  */
25
  if ((ecx & (bit_AVX | bit_AES)) == (bit_AVX | bit_AES))
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.