diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-23 10:51:41 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-23 10:51:41 -0800 |
commit | 644a969e1cf82bec7d0a8f003986c6d4aab84bdd (patch) | |
tree | 0eaa0ac7bc22b30fca94d10d712282d12ff97294 | |
parent | 58cad1436d5d03d71fe554081e590a9202911cb2 (diff) |
fix default bits for integer multiply
-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 f19eb9d5..7d1a7cd9 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1392,7 +1392,7 @@ function getFastValue(a, op, b, type) { } if (!(type in Runtime.FLOAT_TYPES)) { // if guaranteed small enough to not overflow into a double, do a normal multiply - var bits = getBits(type); + var bits = getBits(type) || 32; // default is 32-bit multiply for things like getelementptr indexes if ((isNumber(a) && Math.abs(a) < TWO_TWENTY) || (isNumber(b) && Math.abs(b) < TWO_TWENTY) || bits < 32) { return '(((' + a + ')*(' + b + '))&' + ((Math.pow(2, bits)-1)|0) + ')'; // keep a non-eliminatable coercion directly on this } |