Index: test/mjsunit/wasm/asm-wasm-u32.js |
diff --git a/test/mjsunit/wasm/asm-wasm-u32.js b/test/mjsunit/wasm/asm-wasm-u32.js |
index 946f05b6c0a5dcf5e767c6ebb76baea3f1523e85..806c99bcec1620b30e11b0dc7bbee212acbc8056 100644 |
--- a/test/mjsunit/wasm/asm-wasm-u32.js |
+++ b/test/mjsunit/wasm/asm-wasm-u32.js |
@@ -43,13 +43,13 @@ const imul = Math.imul; |
function u32_add(a, b) { |
a = a | 0; |
b = b | 0; |
- return +((a >>> 0) + (b >>> 0)); |
+ return +(((a >>> 0) + (b >>> 0)) >>> 0); |
} |
function u32_sub(a, b) { |
a = a | 0; |
b = b | 0; |
- return +((a >>> 0) - (b >>> 0)); |
+ return +(((a >>> 0) - (b >>> 0)) >>> 0); |
} |
function u32_mul(a, b) { |
@@ -61,13 +61,13 @@ function u32_mul(a, b) { |
function u32_div(a, b) { |
a = a | 0; |
b = b | 0; |
- return ((a >>> 0) / (b >>> 0)) | 0; |
+ return +(((a >>> 0) / (b >>> 0)) >>> 0); |
} |
function u32_mod(a, b) { |
a = a | 0; |
b = b | 0; |
- return ((a >>> 0) % (b >>> 0)) | 0; |
+ return +(((a >>> 0) % (b >>> 0)) >>> 0); |
} |
function u32_and(a, b) { |
@@ -188,11 +188,10 @@ var inputs = [ |
]; |
var funcs = [ |
-// TODO(bradnelson): u32_add, |
-// TODO(bradnelson): u32_sub, |
-// TODO(titzer): u32_mul requires Math.imul |
-// TODO(titzer): u32_div by zero is incorrect |
-// TODO(titzer): u32_mod by zero is incorrect |
+ u32_add, |
+ u32_sub, |
+ u32_div, |
+ u32_mod, |
// TODO(titzer): u32_mul crashes turbofan in asm.js mode |
u32_and, |
u32_or, |