diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-12-12 16:38:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-12-12 16:38:58 -0800 |
commit | 8f42941647a97122aa5b357aeff5970f72a30019 (patch) | |
tree | 791172c9f2f07a610ed73eaa801e6891ed2dbea3 /src/parseTools.js | |
parent | 2aa6d93eddceca6d908e4903ce55952180c7d40d (diff) |
support for Math.imul
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index c297b278..0bacebd9 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1975,6 +1975,9 @@ function processMathop(item) { if (ASM_JS) { // special-case: there is no integer multiply in asm, because there is no true integer // multiply in JS. While we wait for Math.imul, do double multiply + if (USE_MATH_IMUL) { + return 'Math.imul(' + idents[0] + ',' + idents[1] + ')'; + } return '(~~(+' + idents[0] + ' * +' + idents[1] + '))'; } return handleOverflow(getFastValue(idents[0], '*', idents[1], item.type), bits); |