projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e0907c
)
fix sh fesetround failure to clear old mode
author
Rich Felker
<dalias@aerifal.cx>
Sat, 18 Apr 2020 07:23:40 +0000
(
03:23
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 18 Apr 2020 07:23:40 +0000
(
03:23
-0400)
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.
src/fenv/sh/fenv.S
patch
|
blob
|
history
diff --git
a/src/fenv/sh/fenv.S
b/src/fenv/sh/fenv.S
index 907aefc0d9d0caeb37dd6214df3db884c9446cae..b3b7d66adacdf6897ebc8ad97e6d03655d0e0d24 100644
(file)
--- a/
src/fenv/sh/fenv.S
+++ b/
src/fenv/sh/fenv.S
@@
-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