aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-11-12 13:39:51 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-11-12 13:39:51 -0800
commitbf464056564e0e154dedab88bb4acfc3ebea018f (patch)
tree1666585dcb66de6d200502ef1342b83e41f45a18 /src
parent8c7af64f1a7326d09be50671574676c21941be2e (diff)
handle as best we can surprising types for legalized bitcasts. fixes #701
Diffstat (limited to 'src')
-rw-r--r--src/analyzer.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/analyzer.js b/src/analyzer.js
index fa8aee59..c09739e9 100644
--- a/src/analyzer.js
+++ b/src/analyzer.js
@@ -467,6 +467,12 @@ function analyzer(data, sidePass) {
break;
}
case 'bitcast': {
+ if (!sourceBits) {
+ // we can be asked to bitcast doubles or such to integers, handle that as best we can (if it's a double that
+ // was an x86_fp80, this code will likely break when called)
+ sourceBits = targetBits = Runtime.getNativeTypeSize(value.params[0].type);
+ warn('legalizing non-integer bitcast on ll #' + item.lineNum);
+ }
break;
}
case 'select': {