mirror of
git://git.musl-libc.org/musl
synced 2025-03-06 20:48:29 +01:00
fix sh fesetround failure to clear old mode
the sh version of fesetround or'd the new rounding mode onto the control register without clearing the old rounding mode bits, making changes sticky. this was the root cause of multiple test failures.
This commit is contained in:
parent
2e0907ce62
commit
043c6e31d9
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,8 @@ fegetround:
|
|||
.type __fesetround, @function
|
||||
__fesetround:
|
||||
sts fpscr, r0
|
||||
mov #-4, r1
|
||||
and r1, r0
|
||||
or r4, r0
|
||||
lds r0, fpscr
|
||||
rts
|
||||
|
|
Loading…
Add table
Reference in a new issue