repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
drd/tests/Makefile.am: Use -faligned-new for C++ code if supported
[valgrind.git]
/
VEX
/
test
/
fstenv.c
blob
331714dcfd1886dbd67123124b503125dcd4a994
1
2
#include <stdio.h>
3
#include <stdlib.h>
4
5
void
do_fstenv
(
void
*
p
)
6
{
7
asm
(
"fldpi ; fld1; fldln2 ; movl 8(%esp), %eax ; fstenv (%eax)"
);
8
}
9
10
int
main
(
void
)
11
{
12
int
i
;
13
unsigned int
*
buf
=
malloc
(
7
*
sizeof
(
int
));
14
do_fstenv
(
buf
);
15
for
(
i
=
0
;
i
<
7
;
i
++) {
16
printf
(
"%08x "
,
buf
[
i
]);
17
if
(
i
>
0
&& ((
i
%
6
) ==
5
))
18
printf
(
"
\n
"
);
19
}
20
printf
(
"
\n
"
);
21
return
0
;
22
}