summaryrefslogtreecommitdiff
path: root/test/unit.fromasm.imprecise
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-07-20 13:33:29 -0700
committerGitHub <noreply@github.com>2017-07-20 13:33:29 -0700
commitda680fdbcb7eaad1c692369c7c826fc02b00c877 (patch)
tree28826407cb8432c53a436381249c70dbaee4a2f6 /test/unit.fromasm.imprecise
parent9ff9885b5d5d3415bb83a88967709e0c941be16e (diff)
downloadbinaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.tar.gz
binaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.tar.bz2
binaryen-da680fdbcb7eaad1c692369c7c826fc02b00c877.zip
fix f32 frem in asm2wasm #1105 (#1106)
Diffstat (limited to 'test/unit.fromasm.imprecise')
-rw-r--r--test/unit.fromasm.imprecise14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/unit.fromasm.imprecise b/test/unit.fromasm.imprecise
index ea664d5f0..8ee0b073f 100644
--- a/test/unit.fromasm.imprecise
+++ b/test/unit.fromasm.imprecise
@@ -30,6 +30,7 @@
(export "conversions" (func $big_negative))
(export "switcher" (func $switcher))
(export "frem" (func $frem))
+ (export "frem_float" (func $legalstub$frem_float))
(export "big_uint_div_u" (func $big_uint_div_u))
(export "fr" (func $legalstub$fr))
(export "negZero" (func $negZero))
@@ -226,6 +227,14 @@
(f64.const 1.2)
)
)
+ (func $frem_float (result f32)
+ (f32.demote/f64
+ (call $f64-rem
+ (f64.const 5.5)
+ (f64.const 1.2000000476837158)
+ )
+ )
+ )
(func $big_uint_div_u (result i32)
(i32.const 2147483647)
)
@@ -1190,6 +1199,11 @@
(func $ii (param $0 i32) (result i32)
(get_local $0)
)
+ (func $legalstub$frem_float (result f64)
+ (f64.promote/f32
+ (call $frem_float)
+ )
+ )
(func $legalstub$fr (param $0 f64)
(call $fr
(f32.demote/f64