From 3fc5948abf1b2179e54f5d31bf694893b8413f1a Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Thu, 10 May 2012 16:19:07 +0200 Subject: [PATCH] ARM: Fix modulo operator and math.floor/ceil for inf/nan. --- src/buildvm_arm.dasc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/buildvm_arm.dasc b/src/buildvm_arm.dasc index c75353d9..3b1b8d7f 100644 --- a/src/buildvm_arm.dasc +++ b/src/buildvm_arm.dasc @@ -1303,6 +1303,7 @@ static void build_subroutines(BuildCtx *ctx) | b ->fff_restv | |2: // |x| < 1 + | bcs ->fff_restv // |x| is not finite. | orr CARG3, CARG3, CARG1 // ztest = abs(hi) | lo |.if "func" == "floor" | tst CARG3, CARG2, asr #31 // return (ztest & sign) == 0 ? 0 : -1 @@ -2055,6 +2056,7 @@ static void build_subroutines(BuildCtx *ctx) | bx lr | |2: // |x| < 1: + | bxcs lr // |x| is not finite. | orr CARG3, CARG3, CARG1 // ztest = (2*hi) | lo |.if "func" == "floor" | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0)