diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-23 15:50:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-23 15:50:22 -0800 |
commit | c2692a1acba58bb6d47e148ee26328094f8f2c5c (patch) | |
tree | 55ceb2a21401021cccc400127a1db798ba1108cd /src/analyzer.js | |
parent | 3d4bce8844b3bea7595858eee6221c3ad40fb19b (diff) |
fix fuzzbug regarding signed 64-bit extension
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index adc615fb..c930231f 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -684,9 +684,9 @@ function analyzer(data, sidePass) { params: [(signed && j + whole > sourceElements.length) ? signedKeepAlive : null], type: 'i32', }; - if (j == 0 && isUnsignedOp(value.op) && sourceBits < 32) { + if (j == 0 && sourceBits < 32) { // zext sign correction - result.ident = makeSignOp(result.ident, 'i' + sourceBits, 'un', 1, 1); + result.ident = makeSignOp(result.ident, 'i' + sourceBits, isUnsignedOp(value.op) ? 'un' : 're', 1, 1); } if (fraction != 0) { var other = { |