diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-01-21 20:58:21 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-01-21 20:58:21 -0800 |
commit | 85971d17a7b4389df0eabc52e345610a3ebc715d (patch) | |
tree | d4158487e7d367b577c27ccb41222124b413759f /src/parseTools.js | |
parent | a55f090bd22083e81f770ccc5f2297bc969dd6b9 (diff) |
coerce to int the output of integer multiply in all cases
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index d054e359..9e478cb7 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -2110,7 +2110,7 @@ function processMathop(item) { Types.preciseI64MathUsed = true; return '(i64Math' + (ASM_JS ? '_' : '.') + 'multiply(' + asmCoercion(idents[0], 'i32') + ',0,' + asmCoercion(idents[1], 'i32') + ',0),' + makeGetValue('tempDoublePtr', 0, 'i32') + ')'; } else { - return handleOverflow(getFastValue(idents[0], '*', idents[1], item.type), bits); + return '((' +getFastValue(idents[0], '*', idents[1], item.type) + ')&-1)'; // force a non-eliminatable coercion here, to prevent a double result from leaking } } case 'urem': case 'srem': return getFastValue(idents[0], '%', idents[1], item.type); |