summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.imprecise.no-opts
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-04-18 17:27:32 -0700
committerGitHub <noreply@github.com>2017-04-18 17:27:32 -0700
commitc945f3be7732e77402d696389482b290be7626cd (patch)
tree4c7b5ccbe6f57ff4ec5aa9e89bc298f38dc5408f /test/unit.fromasm.imprecise.no-opts
parent0dc8efbf7f5ac474fadff934eb78cd5f8551d0bb (diff)
parenta9b1d78072bd1875d926cfb0ae51a6eb4dc49b4e (diff)
downloadbinaryen-c945f3be7732e77402d696389482b290be7626cd.tar.gz
binaryen-c945f3be7732e77402d696389482b290be7626cd.tar.bz2
binaryen-c945f3be7732e77402d696389482b290be7626cd.zip
Merge pull request #976 from WebAssembly/fix-f2u
Fix asm2wasm unsigned float-to-int
Diffstat (limited to 'test/unit.fromasm.imprecise.no-opts')
-rw-r--r--test/unit.fromasm.imprecise.no-opts24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit.fromasm.imprecise.no-opts b/test/unit.fromasm.imprecise.no-opts
index f1625311d..736f51222 100644
--- a/test/unit.fromasm.imprecise.no-opts
+++ b/test/unit.fromasm.imprecise.no-opts
@@ -1871,12 +1871,36 @@
)
)
)
+ (func $f2u (param $x f64) (result i32)
+ (return
+ (i32.trunc_u/f64
+ (get_local $x)
+ )
+ )
+ )
+ (func $f2s (param $x f64) (result i32)
+ (return
+ (i32.trunc_s/f64
+ (get_local $x)
+ )
+ )
+ )
(func $keepAlive
(drop
(call $sqrts
(f64.const 3.14159)
)
)
+ (drop
+ (call $f2u
+ (f64.const 100)
+ )
+ )
+ (drop
+ (call $f2s
+ (f64.const 100)
+ )
+ )
)
(func $v
(nop)