diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-11-19 12:13:58 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-12-07 16:50:04 -1000 |
commit | 0a498b945e6fe51db9fd3e5b76997e3f40b735a7 (patch) | |
tree | d9f3bf67eabb7a465dc0a16cc9fac81302f47a25 /test/min.fromasm.imprecise.no-opts | |
parent | 420f28ff46322b1d9eddd20ce4bd4f30b42fa311 (diff) | |
download | binaryen-0a498b945e6fe51db9fd3e5b76997e3f40b735a7.tar.gz binaryen-0a498b945e6fe51db9fd3e5b76997e3f40b735a7.tar.bz2 binaryen-0a498b945e6fe51db9fd3e5b76997e3f40b735a7.zip |
make legalizeJSInterface handle f32s as well, which are not valid in asm.js ffis
Diffstat (limited to 'test/min.fromasm.imprecise.no-opts')
-rw-r--r-- | test/min.fromasm.imprecise.no-opts | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/test/min.fromasm.imprecise.no-opts b/test/min.fromasm.imprecise.no-opts index 4bbdeff65..6e8a1c9ea 100644 --- a/test/min.fromasm.imprecise.no-opts +++ b/test/min.fromasm.imprecise.no-opts @@ -6,10 +6,10 @@ (import "env" "tableBase" (global $tableBase i32)) (global $tDP (mut i32) (get_global $tDP$asm2wasm$import)) (global $M (mut i32) (i32.const 0)) - (export "floats" (func $floats)) + (export "floats" (func $legalstub$floats)) (export "getTempRet0" (func $ub)) - (export "neg" (func $neg)) - (export "bitcasts" (func $bitcasts)) + (export "neg" (func $legalstub$neg)) + (export "bitcasts" (func $legalstub$bitcasts)) (export "ctzzzz" (func $ctzzzz)) (func $floats (param $f f32) (result f32) (local $t f32) @@ -73,4 +73,29 @@ (get_global $M) ) ) + (func $legalstub$floats (param $0 f64) (result f64) + (f64.promote/f32 + (call $floats + (f32.demote/f64 + (get_local $0) + ) + ) + ) + ) + (func $legalstub$neg (param $0 i32) (param $1 i32) (result f64) + (f64.promote/f32 + (call $neg + (get_local $0) + (get_local $1) + ) + ) + ) + (func $legalstub$bitcasts (param $0 i32) (param $1 f64) + (call $bitcasts + (get_local $0) + (f32.demote/f64 + (get_local $1) + ) + ) + ) ) |