diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-14 14:30:28 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-14 14:30:28 -0800 |
commit | 716f22a0cb9e99dc788c3cd9ea24d50e49373ebb (patch) | |
tree | c226dddb5117850dc59544ce1f9b6d07cdfe4aba | |
parent | 9d6704476bf5fc8783501a4ab1e7db90f6dd155e (diff) |
handle odd types like i24 in makeSignOp, fixes asm1.test_fuzz on llvm 3.3
-rw-r--r-- | src/parseTools.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 3c2eeece..c08c9f85 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -2058,7 +2058,7 @@ function makeSignOp(value, type, op, force, ignore) { if (isPointerType(type)) type = 'i32'; // Pointers are treated as 32-bit ints if (!value) return value; var bits, full; - if (type in Runtime.INT_TYPES) { + if (type[0] === 'i') { bits = parseInt(type.substr(1)); full = op + 'Sign(' + value + ', ' + bits + ', ' + Math.floor(ignore || correctSpecificSign()) + ')'; // Always sign/unsign constants at compile time, regardless of CHECK/CORRECT @@ -2067,7 +2067,7 @@ function makeSignOp(value, type, op, force, ignore) { } } if ((ignore || !correctSigns()) && !CHECK_SIGNS && !force) return value; - if (type in Runtime.INT_TYPES) { + if (type[0] === 'i') { // this is an integer, but not a number (or we would have already handled it) // shortcuts if (!CHECK_SIGNS || ignore) { |