aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-01-11 19:17:42 -0800
committerAlon Zakai <alonzakai@gmail.com>2013-01-11 19:19:55 -0800
commit23fbe4113290f07b8fbb03f63e0e9ef636fb3aed (patch)
tree2e3d8c8187a6b5a4fdf357f42e4f0487ce78559d
parent8a4fdd5adc853ff0332daca63268349c02910dd8 (diff)
make asm i32 multiply use signed math
-rw-r--r--src/parseTools.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index 8d6115b8..32bf70e9 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -1038,7 +1038,7 @@ function asmMultiplyI32(a, b) {
if (USE_MATH_IMUL) {
return 'Math.imul(' + a + ',' + b + ')';
}
- return '(~~(+' + a + ' * +' + b + '))';
+ return '(~~(+((' + a + ')|0) * +((' + b + ')|0)))';
}
function makeGetTempDouble(i, type) { // get an aliased part of the tempDouble temporary storage