summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-03-05 19:06:32 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-03-05 19:06:32 -0800
commitc1823df9feea7ea90e3886cb18fedee56df48156 (patch)
treef1301cdab0c35aec1b8daac51b89d305366e579b /test/unit.asm.js
parent49b8031ecf4695850d060ef11926caddf4bd3352 (diff)
downloadbinaryen-c1823df9feea7ea90e3886cb18fedee56df48156.tar.gz
binaryen-c1823df9feea7ea90e3886cb18fedee56df48156.tar.bz2
binaryen-c1823df9feea7ea90e3886cb18fedee56df48156.zip
cast f32 to f64 before calling f64-to-int in asm2wasm
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index b9c878613..e5673146d 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -41,8 +41,9 @@ function asm() {
return !x;
}
function conversions() {
- var i = 0, d = 0.0;
+ var i = 0, d = 0.0, f = Math_fround(0);
i = ~~d;
+ i = ~~f;
d = +(i | 0);
d = +(i >>> 0);
}