diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-02-10 18:33:46 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-02-10 18:33:46 -0800 |
commit | 123063bc5bdbebce5bafb79b89f507ba0a0c1488 (patch) | |
tree | 4d24a70e40d82e8e55568334e262a40ed8a69cce /src | |
parent | 4928f86a496bec355df44b2f54e080706b07fcce (diff) |
force inputs to inttoptr to be i32 if they are i64; fixes #827
Diffstat (limited to 'src')
-rw-r--r-- | src/analyzer.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 1c53b76c..adc615fb 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -223,6 +223,9 @@ function analyzer(data, sidePass) { for (var i = 0; i < item.params.length; i++) { if (item.params[i].type == 'i64') item.params[i].type = 'i32'; } + } else if (item.intertype == 'inttoptr') { + var input = item.params[0]; + if (input.type == 'i64') input.type = 'i32'; // inttoptr can only care about 32 bits anyhow since pointers are 32-bit } if (isIllegalType(item.valueType) || isIllegalType(item.type)) { isIllegal = true; |