diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-11 10:59:18 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-11 10:59:18 -0800 |
commit | 9d006256df96e6d81bf869958af28643720f14db (patch) | |
tree | 390f01f4f4ddb8e19c5899415644009337206ce6 | |
parent | fa0443ee8ef4306ee2bf848a6c18d189bafbac77 (diff) |
coerce to double before converting a float to an i64
-rw-r--r-- | src/parseTools.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index adb3f6e4..e806c861 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -2259,7 +2259,7 @@ function processMathop(item) { throw 'shifts should have been legalized!'; } case 'uitofp': case 'sitofp': return makeFloat(RuntimeGenerator.makeBigInt(low1, high1, op[0] == 'u'), item.type); - case 'fptoui': case 'fptosi': return finish(splitI64(idents[0], true)); + case 'fptoui': case 'fptosi': return finish(splitI64(asmCoercion(idents[0], 'double'), true)); // coerce to double before conversion to i64 case 'icmp': { switch (variant) { case 'uge': return '((' + high1 + '>>>0) >= (' + high2 + '>>>0)) & ((((' + high1 + '>>>0) > (' + high2 + '>>>0)) | ' + |