aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parseTools.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/parseTools.js b/src/parseTools.js
index a6f2e35e..a61b5035 100644
--- a/src/parseTools.js
+++ b/src/parseTools.js
@@ -2491,8 +2491,15 @@ function processMathop(item) {
}
// otherwise, fall through
}
- case 'fpext': case 'sext': return idents[0];
- case 'fptrunc': return idents[0];
+ case 'sext': return idents[0];
+ case 'fpext': {
+ if (FROUND) return '+(' + idents[0] + ')';
+ return idents[0];
+ }
+ case 'fptrunc': {
+ if (FROUND) return 'Math_fround(' + idents[0] + ')';
+ return idents[0];
+ }
case 'select': return idents[0] + '?' + asmEnsureFloat(idents[1], item.type) + ':' + asmEnsureFloat(idents[2], item.type);
case 'ptrtoint': case 'inttoptr': {
var ret = '';