diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-06-13 13:37:16 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-06-13 13:37:16 -0400 |
commit | 52cf24a0f45f208b1627a64e4af9a5ed8cb28ae7 (patch) | |
tree | 93cd6fa25d45c0fe6e007653f1b924d0add6c953 /src/fenv | |
parent | b09b78905b09016becda8df81a43e11bebd88208 (diff) | |
download | musl-52cf24a0f45f208b1627a64e4af9a5ed8cb28ae7.tar.gz |
fix fesetround - it was writing to status word instead of control word
Diffstat (limited to 'src/fenv')
-rw-r--r-- | src/fenv/i386/fenv.s | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/fenv/i386/fenv.s b/src/fenv/i386/fenv.s index 72d2ed7d..34101d58 100644 --- a/src/fenv/i386/fenv.s +++ b/src/fenv/i386/fenv.s @@ -27,10 +27,15 @@ feraiseexcept: .global fesetround fesetround: + mov 4(%esp),%ecx xor %eax,%eax - mov $0xc00,%ecx - mov 4(%esp),%edx - jmp 2b + sub $32,%esp + fnstenv (%esp) + andb $0xf3,1(%esp) + or %ecx,(%esp) + fldenv (%esp) + add $32,%esp + ret .global fegetround fegetround: |