projects
/
libfirm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
call optimize_cf() to delete dead-code that might arise after cond_eval
[libfirm]
/
ir
/
be
/
test
/
fehler020.c
1
#include <stdio.h>
2
#include <math.h>
3
4
int end = 4;
5
float k[] = { 2.8, 2.8, 2.8, 2.8, 2.8 };
6
7
void print_fpcw()
8
{
9
#ifdef __i386__
10
int val = 0;
11
__asm__ (
12
"subl $4, %%esp\n"
13
"fnstcw (%%esp)\n"
14
"movzwl (%%esp), %0\n"
15
"addl $4, %%esp\n" : "=r"(val));
16
17
printf("%x\n", val);
18
#else
19
printf("%d\n", (int) k[0]);
20
#endif
21
}
22
23
int main()
24
{
25
int i;
26
int res = 0;
27
28
for(i = 0; i < end; ++i) {
29
print_fpcw();
30
res = (int) k[i];
31
}
32
print_fpcw();
33
printf("%d\n", res);
34
35
return 0;
36
}