aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/analyzer.js12
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]