projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
minor 387 fenv optimizations
[musl]
/
src
/
fenv
/
i386
/
fenv.s
1
2: not %ecx
2
sub $32,%esp
3
fnstenv (%esp)
4
and %ecx,4(%esp)
5
or %edx,4(%esp)
6
fldenv (%esp)
7
add $32,%esp
8
ret
9
10
.global feclearexcept
11
.type feclearexcept,@function
12
feclearexcept:
13
xor %eax,%eax
14
mov 4(%esp),%ecx
15
xor %edx,%edx
16
test %ecx,%ecx
17
jnz 2b
18
ret
19
20
.global feraiseexcept
21
.type feraiseexcept,@function
22
feraiseexcept:
23
xor %eax,%eax
24
mov 4(%esp),%edx
25
xor %ecx,%ecx
26
test %edx,%edx
27
jnz 2b
28
ret
29
30
.global fesetround
31
.type fesetround,@function
32
fesetround:
33
mov 4(%esp),%ecx
34
push %eax
35
xor %eax,%eax
36
fnstcw (%esp)
37
andb $0xf3,1(%esp)
38
or %ch,1(%esp)
39
fldcw (%esp)
40
pop %ecx
41
ret
42
43
.global fegetround
44
.type fegetround,@function
45
fegetround:
46
push %eax
47
fnstcw (%esp)
48
pop %eax
49
and $0xc00,%eax
50
ret
51
52
.global fegetenv
53
.type fegetenv,@function
54
fegetenv:
55
mov 4(%esp),%ecx
56
xor %eax,%eax
57
fnstenv (%ecx)
58
ret
59
60
.global fesetenv
61
.type fesetenv,@function
62
fesetenv:
63
mov 4(%esp),%ecx
64
xor %eax,%eax
65
test %ecx,%ecx
66
jz 1f
67
fldenv (%ecx)
68
ret
69
1: push %eax
70
push %eax
71
push %eax
72
push %eax
73
push %eax
74
push %eax
75
pushl $0x37f
76
fldenv (%esp)
77
add $28,%esp
78
ret
79
80
.global fetestexcept
81
.type fetestexcept,@function
82
fetestexcept:
83
mov 4(%esp),%ecx
84
fnstsw %ax
85
and %ecx,%eax
86
ret