repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
aes-check.h
blob
7e794423e47ed7cdd44905a3f10dfc191a29ce77
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
#include
"cpuid.h"
5
6
static void
aes_test
(
void
);
7
8
static void
9
__attribute__
((
noinline
))
10
do_test
(
void
)
11
{
12
aes_test
();
13
}
14
15
int
16
main
()
17
{
18
unsigned int
eax
,
ebx
,
ecx
,
edx
;
19
20
if
(!
__get_cpuid
(
1
, &
eax
, &
ebx
, &
ecx
, &
edx
))
21
return
0
;
22
23
/* Run AES test only if host has AES support. */
24
if
(
ecx
&
bit_AES
)
25
{
26
do_test
();
27
#ifdef DEBUG
28
printf
(
"PASSED
\n
"
);
29
#endif
30
}
31
#ifdef DEBUG
32
else
33
printf
(
"SKIPPED
\n
"
);
34
#endif
35
36
return
0
;
37
}