diff options
author | Mike Pall <mike> | 2012-05-10 16:19:07 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2012-05-10 16:19:07 +0200 |
commit | 3fc5948abf1b2179e54f5d31bf694893b8413f1a (patch) | |
tree | 44860d7c8089afff2e5180470cebf5befda23844 /src | |
parent | 48567b60435cea890322d771a3b22280494b3b75 (diff) | |
download | luajit-3fc5948abf1b2179e54f5d31bf694893b8413f1a.tar.gz luajit-3fc5948abf1b2179e54f5d31bf694893b8413f1a.tar.bz2 luajit-3fc5948abf1b2179e54f5d31bf694893b8413f1a.zip |
ARM: Fix modulo operator and math.floor/ceil for inf/nan.
Diffstat (limited to 'src')
-rw-r--r-- | src/buildvm_arm.dasc | 2 |
1 files changed, 2 insertions, 0 deletions
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) | |||
1303 | | b ->fff_restv | 1303 | | b ->fff_restv |
1304 | | | 1304 | | |
1305 | |2: // |x| < 1 | 1305 | |2: // |x| < 1 |
1306 | | bcs ->fff_restv // |x| is not finite. | ||
1306 | | orr CARG3, CARG3, CARG1 // ztest = abs(hi) | lo | 1307 | | orr CARG3, CARG3, CARG1 // ztest = abs(hi) | lo |
1307 | |.if "func" == "floor" | 1308 | |.if "func" == "floor" |
1308 | | tst CARG3, CARG2, asr #31 // return (ztest & sign) == 0 ? 0 : -1 | 1309 | | tst CARG3, CARG2, asr #31 // return (ztest & sign) == 0 ? 0 : -1 |
@@ -2055,6 +2056,7 @@ static void build_subroutines(BuildCtx *ctx) | |||
2055 | | bx lr | 2056 | | bx lr |
2056 | | | 2057 | | |
2057 | |2: // |x| < 1: | 2058 | |2: // |x| < 1: |
2059 | | bxcs lr // |x| is not finite. | ||
2058 | | orr CARG3, CARG3, CARG1 // ztest = (2*hi) | lo | 2060 | | orr CARG3, CARG3, CARG1 // ztest = (2*hi) | lo |
2059 | |.if "func" == "floor" | 2061 | |.if "func" == "floor" |
2060 | | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0) | 2062 | | tst CARG3, CARG2, asr #31 // iszero = ((ztest & signmask) == 0) |