Index: test/mjsunit/asm/uint32mod.js |
diff --git a/test/mjsunit/asm/uint32mod.js b/test/mjsunit/asm/uint32mod.js |
index fa40507c7f746a27ea6f7ef020836023b64a87ee..137e64d7f91ab8f24b5f6ea7092f8ba9571b2fd8 100644 |
--- a/test/mjsunit/asm/uint32mod.js |
+++ b/test/mjsunit/asm/uint32mod.js |
@@ -9,9 +9,9 @@ var heap = new ArrayBuffer(64 * 1024); |
var mod = (function Module(stdlib, foreign, heap) { |
"use asm"; |
function mod(dividend, divisor) { |
- dividend = dividend >>> 0; |
- divisor = divisor >>> 0; |
- return (dividend % divisor) >>> 0; |
+ dividend = dividend | 0; |
+ divisor = divisor | 0; |
+ return ((dividend >>> 0) % (divisor >>> 0)) | 0; |
} |
return { mod: mod }; |
})(stdlib, foreign, heap).mod; |
@@ -20,6 +20,6 @@ var divisors = [0, 1, 3, 4, 10, 42, 64, 100, 1024, 2147483647, 4294967295]; |
for (var i in divisors) { |
var divisor = divisors[i]; |
for (var dividend = 0; dividend < 4294967296; dividend += 3999773) { |
- assertEquals((dividend % divisor) >>> 0, mod(dividend, divisor)); |
+ assertEquals((dividend % divisor) | 0, mod(dividend, divisor)); |
} |
} |