summaryrefslogtreecommitdiff
path: root/src/fenv/i386/fenv.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-03-17 17:49:10 -0400
committerRich Felker <dalias@aerifal.cx>2012-03-17 17:49:10 -0400
commitd5e576c7527c42b376d20ef38669ffc2a78b0a76 (patch)
tree4548cbf4fc0e035815072cd9a2a55e7524e6ff93 /src/fenv/i386/fenv.s
parent0b337e04aafe2cf5012bbef67b250eb25da67e0f (diff)
downloadmusl-d5e576c7527c42b376d20ef38669ffc2a78b0a76.tar.gz
musl-d5e576c7527c42b376d20ef38669ffc2a78b0a76.tar.bz2
musl-d5e576c7527c42b376d20ef38669ffc2a78b0a76.tar.xz
musl-d5e576c7527c42b376d20ef38669ffc2a78b0a76.zip
minor 387 fenv optimizations
Diffstat (limited to 'src/fenv/i386/fenv.s')
-rw-r--r--src/fenv/i386/fenv.s11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/fenv/i386/fenv.s b/src/fenv/i386/fenv.s
index ee2eae6e..647b7961 100644
--- a/src/fenv/i386/fenv.s
+++ b/src/fenv/i386/fenv.s
@@ -31,22 +31,21 @@ feraiseexcept:
.type fesetround,@function
fesetround:
mov 4(%esp),%ecx
+ push %eax
xor %eax,%eax
- sub $4,%esp
fnstcw (%esp)
andb $0xf3,1(%esp)
- or %cx,(%esp)
+ or %ch,1(%esp)
fldcw (%esp)
- add $4,%esp
+ pop %ecx
ret
.global fegetround
.type fegetround,@function
fegetround:
- sub $4,%esp
+ push %eax
fnstcw (%esp)
- mov (%esp),%ax
- add $4,%esp
+ pop %eax
and $0xc00,%eax
ret