If the 'r' flag is omitted from vcvt, the rounding mode specified
in the fpscr is ignored.
---
 mingw-w64-crt/math/ceilf.S  | 2 +-
 mingw-w64-crt/math/floorf.S | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mingw-w64-crt/math/ceilf.S b/mingw-w64-crt/math/ceilf.S
index def516e..bb77ed6 100644
--- a/mingw-w64-crt/math/ceilf.S
+++ b/mingw-w64-crt/math/ceilf.S
@@ -97,7 +97,7 @@ __MINGW_USYMBOL(ceilf):
        bic             r0, r1, #0x00c00000
        orr             r0, r0, #0x00400000 /* Round towards Plus Infinity */
        vmsr    fpscr, r0
-       vcvt.s32.f32    s0, s0
+       vcvtr.s32.f32   s0, s0
        vcvt.f32.s32    s0, s0
        vmsr    fpscr, r1
 2:
diff --git a/mingw-w64-crt/math/floorf.S b/mingw-w64-crt/math/floorf.S
index 94efa2a..fb9b705 100644
--- a/mingw-w64-crt/math/floorf.S
+++ b/mingw-w64-crt/math/floorf.S
@@ -37,7 +37,7 @@ __MINGW_USYMBOL(floorf):
        bic             r0, r1, #0x00c00000
        orr             r0, r0, #0x00800000 /* Round towards Minus Infinity */
        vmsr    fpscr, r0
-       vcvt.s32.f32    s0, s0
+       vcvtr.s32.f32   s0, s0
        vcvt.f32.s32    s0, s0
        vmsr    fpscr, r1
 2:
-- 
2.7.4


------------------------------------------------------------------------------
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to