diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-02-11 10:38:22 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-02-11 14:54:57 -0800 |
commit | 62553739259e76bb0974be8dfc72fd85bb2aa8d0 (patch) | |
tree | e68d5af07526ed9f87797067b5a237929009f834 /src/analyzer.js | |
parent | 93f440f4d676ed8a042fd5ed678dc0aee01bda5c (diff) |
do not try to legalize bitcasts between doubles and floats
Diffstat (limited to 'src/analyzer.js')
-rw-r--r-- | src/analyzer.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/analyzer.js b/src/analyzer.js index 2b93ba2f..1c643303 100644 --- a/src/analyzer.js +++ b/src/analyzer.js @@ -377,7 +377,17 @@ function analyzer(data, sidePass) { i += removeAndAdd(label.lines, i, toAdd); continue; } - case 'bitcast': case 'inttoptr': case 'ptrtoint': { + case 'bitcast': { + var inType = item.type2; + var outType = item.type; + if ((inType in Runtime.INT_TYPES && outType in Runtime.FLOAT_TYPES) || + (inType in Runtime.FLOAT_TYPES && outType in Runtime.INT_TYPES)) { + i++; + continue; // special case, handled in processMathop + } + // fall through + } + case 'inttoptr': case 'ptrtoint': { value = { op: item.intertype, param1: item.params[0] |