On Thu, 18 Aug 2016, Martin Storsjö wrote:

---
The indentation probably looks wonky in ths patch, but I'm trying
to match the style of the rest of the arm assembly below, which
uses tabs, equal to 4 spaces.

This probably also should be done to a lot of other math functions,
but I only ran into this as an issue with floor, in the libav testsuite.
---
mingw-w64-crt/math/ceil.S   | 7 +++++++
mingw-w64-crt/math/ceilf.S  | 6 ++++++
mingw-w64-crt/math/ceill.S  | 7 +++++++
mingw-w64-crt/math/floor.S  | 7 +++++++
mingw-w64-crt/math/floorf.S | 6 ++++++
mingw-w64-crt/math/floorl.S | 7 +++++++
6 files changed, 40 insertions(+)

diff --git a/mingw-w64-crt/math/ceil.S b/mingw-w64-crt/math/ceil.S
index 2ce21dd..bb8a6e9 100644
--- a/mingw-w64-crt/math/ceil.S
+++ b/mingw-w64-crt/math/ceil.S
@@ -92,6 +92,12 @@ __MINGW_USYMBOL(ceil):
        .long   0
        .long   0
#elif defined(_ARM_) || defined(__arm__)
+       vmov    r2, r3, d0
+       lsr             r3, r3, #20
+       bic             r3, r3, #0x800
+       movw    r2, #0x7ff
+       cmp             r2, r3 /* Check for INF/NAN, just return the input in 
those cases */
+       beq             2f
        vmrs    r1, fpscr
        bic             r0, r1, #0x00c00000
        orr             r0, r0, #0x00400000 /* Round towards Plus Infinity */
@@ -99,6 +105,7 @@ __MINGW_USYMBOL(ceil):
        vcvtr.s32.f64   s0, d0
        vcvt.f64.s32    d0, s0
        vmsr    fpscr, r1
+2:
        bx      lr


This was OK'd by Kai in another mail on another thread; pushed with a slight simplification that gets rid of the extra local label.

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

Reply via email to