From: Rich Felker Date: Sat, 18 Apr 2020 07:23:40 +0000 (-0400) Subject: fix sh fesetround failure to clear old mode X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=043c6e31d9135c27875a1ccb4c0f1638f0170e77;p=oweals%2Fmusl.git 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. --- diff --git a/src/fenv/sh/fenv.S b/src/fenv/sh/fenv.S index 907aefc0..b3b7d66a 100644 --- 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