repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR target/80969 - Fix ICE with -mabi=ms -mavx512f, reduce wasted space when realignin...
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
sha-check.h
blob
e0a18076e15a07bfbfa2983772c0fe906cbc657c
1
#include <stdlib.h>
2
#include
"cpuid.h"
3
4
static void
sha_test
(
void
);
5
6
static void
7
__attribute__
((
noinline
))
8
do_test
(
void
)
9
{
10
sha_test
();
11
}
12
13
int
14
main
()
15
{
16
unsigned int
eax
,
ebx
,
ecx
,
edx
;
17
18
if
(
__get_cpuid_max
(
0
,
NULL
) >=
7
)
19
{
20
__cpuid_count
(
7
,
0
,
eax
,
ebx
,
ecx
,
edx
);
21
22
/* Run SHA test only if host has SHA support. */
23
if
(
ebx
&
bit_SHA
)
24
{
25
do_test
();
26
#ifdef DEBUG
27
printf
(
"PASSED
\n
"
);
28
#endif
29
return
0
;
30
}
31
}
32
33
#ifdef DEBUG
34
printf
(
"SKIPPED
\n
"
);
35
#endif
36
return
0
;
37
}