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
Stop only if there aren't any usable algorithms
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
writeeflags-1.c
blob
446840cb33c4ba2f7f9f0bf7585296e50610ef02
1
/* { dg-do run } */
2
/* { dg-options "-O0" } */
3
4
#include <x86intrin.h>
5
6
#ifdef __x86_64__
7
#define EFLAGS_TYPE unsigned long long int
8
#else
9
#define EFLAGS_TYPE unsigned int
10
#endif
11
12
int
13
main
()
14
{
15
EFLAGS_TYPE flags
=
0xD7
;
/* 111010111b */
16
17
__writeeflags
(
flags
);
18
19
flags
=
__readeflags
();
20
21
if
((
flags
&
0xFF
) !=
0xD7
)
22
abort
();
23
24
#ifdef DEBUG
25
printf
(
"PASSED
\n
"
);
26
#endif
27
28
return
0
;
29
}
30