diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-07-14 17:59:33 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 17:59:33 -0700 |
commit | e4f99f6c81a5f23318787adba6fea1137dc755bb (patch) | |
tree | 2fff27409e894cbfb0d473c4e768455795903505 /test/memorygrowth.fromasm.no-opts | |
parent | 4994da80284c337e5395ad836948ee38ffb967f1 (diff) | |
download | binaryen-e4f99f6c81a5f23318787adba6fea1137dc755bb.tar.gz binaryen-e4f99f6c81a5f23318787adba6fea1137dc755bb.tar.bz2 binaryen-e4f99f6c81a5f23318787adba6fea1137dc755bb.zip |
emit safe calls for i32 div/rem when in precise mode in asm2wasm, as they can trap (#637)
Diffstat (limited to 'test/memorygrowth.fromasm.no-opts')
-rw-r--r-- | test/memorygrowth.fromasm.no-opts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/memorygrowth.fromasm.no-opts b/test/memorygrowth.fromasm.no-opts index dd03e651e..29aa4aa30 100644 --- a/test/memorygrowth.fromasm.no-opts +++ b/test/memorygrowth.fromasm.no-opts @@ -2,11 +2,11 @@ (memory 256 256) (export "memory" memory) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) - (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (import $ja "env" "abort" (param i32)) (import $oa "env" "_pthread_cleanup_pop" (param i32)) (import $pa "env" "___lock" (param i32)) @@ -19,6 +19,7 @@ (import $wa "env" "___syscall54" (param i32 i32) (result i32)) (import $xa "env" "___unlock" (param i32)) (import $ya "env" "___syscall146" (param i32 i32) (result i32)) + (import $i32u-div "asm2wasm" "i32u-div" (param i32 i32) (result i32)) (export "_free" $fb) (export "_main" $Na) (export "_pthread_self" $ib) @@ -11295,7 +11296,7 @@ (get_local $c) ) (set_local $i - (i32.div_u + (call_import $i32u-div (get_local $h) (get_local $b) ) |