diff options
author | Alon Zakai <azakai@google.com> | 2018-12-11 15:30:16 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2018-12-11 16:35:55 -0800 |
commit | 7edaebedb0f7185fae0f3fbf146a1c6b44842f5c (patch) | |
tree | a804d5759e1f2af056807ad71f7a25e83287feb4 /test | |
parent | 3307ca89fc270bdca7e5124dca8dcb54027918c2 (diff) | |
download | binaryen-7edaebedb0f7185fae0f3fbf146a1c6b44842f5c.tar.gz binaryen-7edaebedb0f7185fae0f3fbf146a1c6b44842f5c.tar.bz2 binaryen-7edaebedb0f7185fae0f3fbf146a1c6b44842f5c.zip |
wasm-emscripten-finalize: import env.STACKTOP, like asm2wasm does
Diffstat (limited to 'test')
-rw-r--r-- | test/lld/duplicate_imports.wast.out | 3 | ||||
-rw-r--r-- | test/lld/em_asm.wast.out | 3 | ||||
-rw-r--r-- | test/lld/em_asm_table.wast.out | 3 | ||||
-rw-r--r-- | test/lld/hello_world.wast.mem.out | 3 | ||||
-rw-r--r-- | test/lld/hello_world.wast.out | 3 | ||||
-rw-r--r-- | test/lld/init.wast.out | 3 | ||||
-rw-r--r-- | test/lld/recursive.wast.out | 3 | ||||
-rw-r--r-- | test/lld/reserved_func_ptr.wast.jscall.out | 3 | ||||
-rw-r--r-- | test/lld/reserved_func_ptr.wast.out | 3 |
9 files changed, 18 insertions, 9 deletions
diff --git a/test/lld/duplicate_imports.wast.out b/test/lld/duplicate_imports.wast.out index 3edf1a8a7..98cd37651 100644 --- a/test/lld/duplicate_imports.wast.out +++ b/test/lld/duplicate_imports.wast.out @@ -9,6 +9,7 @@ (type $legaltype$puts2 (func (param i32 i32) (result i32))) (type $legaltype$invoke_ffd (func (param i32 f64 f64) (result f64))) (type $legaltype$invoke_ffd2 (func (param i32 f64 f64) (result f64))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "puts" (func $puts1 (param i32) (result i32))) (import "env" "puts" (func $legalimport$puts2 (param i32 i32) (result i32))) (import "env" "invoke_ffd" (func $legalimport$invoke_ffd (param i32 f64 f64) (result f64))) @@ -16,7 +17,7 @@ (memory $0 2) (data (i32.const 568) "Hello, world\00") (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66128)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66128)) (global $global$2 i32 (i32.const 581)) (export "memory" (memory $0)) diff --git a/test/lld/em_asm.wast.out b/test/lld/em_asm.wast.out index bceda9a75..a4112fba5 100644 --- a/test/lld/em_asm.wast.out +++ b/test/lld/em_asm.wast.out @@ -7,13 +7,14 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "emscripten_asm_const_i" (func $emscripten_asm_const_i (param i32) (result i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) (import "env" "emscripten_asm_const_ii" (func $emscripten_asm_const_ii (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "{ Module.print(\"Hello world\"); }\00{ return $0 + $1; }\00{ Module.print(\"Got \" + $0); }\00") (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66192)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66192)) (global $global$2 i32 (i32.const 652)) (export "memory" (memory $0)) diff --git a/test/lld/em_asm_table.wast.out b/test/lld/em_asm_table.wast.out index be0d1a794..628cf20d5 100644 --- a/test/lld/em_asm_table.wast.out +++ b/test/lld/em_asm_table.wast.out @@ -4,11 +4,12 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (import "env" "memory" (memory $0 8192)) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "emscripten_log" (func $fimport$0 (param i32 i32))) (import "env" "emscripten_asm_const_iii" (func $emscripten_asm_const_iii (param i32 i32 i32) (result i32))) (table $0 159609 anyfunc) (elem (i32.const 1) $fimport$0 $emscripten_asm_const_iii) - (global $global$0 (mut i32) (i32.const 1024)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 1048)) (export "__data_end" (global $global$1)) (export "stackSave" (func $stackSave)) diff --git a/test/lld/hello_world.wast.mem.out b/test/lld/hello_world.wast.mem.out index 2a8a0a062..32eab7450 100644 --- a/test/lld/hello_world.wast.mem.out +++ b/test/lld/hello_world.wast.mem.out @@ -3,10 +3,11 @@ (type $1 (func (result i32))) (type $2 (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66128)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66128)) (global $global$2 i32 (i32.const 581)) (export "memory" (memory $0)) diff --git a/test/lld/hello_world.wast.out b/test/lld/hello_world.wast.out index e20a58d16..d7b5dfaeb 100644 --- a/test/lld/hello_world.wast.out +++ b/test/lld/hello_world.wast.out @@ -3,11 +3,12 @@ (type $1 (func (result i32))) (type $2 (func)) (type $FUNCSIG$ii (func (param i32) (result i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "puts" (func $puts (param i32) (result i32))) (memory $0 2) (data (i32.const 568) "Hello, world\00") (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66128)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66128)) (global $global$2 i32 (i32.const 581)) (export "memory" (memory $0)) diff --git a/test/lld/init.wast.out b/test/lld/init.wast.out index fb944aff4..4152ef2ac 100644 --- a/test/lld/init.wast.out +++ b/test/lld/init.wast.out @@ -1,10 +1,11 @@ (module (type $0 (func)) (type $1 (func (result i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (memory $0 2) (data (i32.const 568) "\00\00\00\00\00\00\00\00") (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66112)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66112)) (global $global$2 i32 (i32.const 576)) (export "memory" (memory $0)) diff --git a/test/lld/recursive.wast.out b/test/lld/recursive.wast.out index 6a705085e..08f7dfa3f 100644 --- a/test/lld/recursive.wast.out +++ b/test/lld/recursive.wast.out @@ -3,11 +3,12 @@ (type $1 (func (result i32))) (type $2 (func)) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "printf" (func $printf (param i32 i32) (result i32))) (memory $0 2) (data (i32.const 568) "%d:%d\n\00Result: %d\n\00") (table $0 1 1 anyfunc) - (global $global$0 (mut i32) (i32.const 66128)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66128)) (global $global$2 i32 (i32.const 587)) (export "memory" (memory $0)) diff --git a/test/lld/reserved_func_ptr.wast.jscall.out b/test/lld/reserved_func_ptr.wast.jscall.out index 7e95fb080..c796a025c 100644 --- a/test/lld/reserved_func_ptr.wast.jscall.out +++ b/test/lld/reserved_func_ptr.wast.jscall.out @@ -18,6 +18,7 @@ (type $FUNCSIG$v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$viiii (func (param i32 i32 i32 i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "_Z4atoiPKc" (func $_Z4atoiPKc (param i32) (result i32))) (import "env" "jsCall_ddi" (func $jsCall_ddi (param i32 f64 i32) (result f64))) (import "env" "jsCall_fffi" (func $jsCall_fffi (param i32 f32 f32 i32) (result f32))) @@ -28,7 +29,7 @@ (memory $0 2) (table $0 21 21 anyfunc) (elem (i32.const 1) $_Z18address_taken_funciii $_Z19address_taken_func2iii $jsCall_ddi_0 $jsCall_ddi_1 $jsCall_ddi_2 $jsCall_fffi_0 $jsCall_fffi_1 $jsCall_fffi_2 $jsCall_iii_0 $jsCall_iii_1 $jsCall_iii_2 $jsCall_v_0 $jsCall_v_1 $jsCall_v_2 $jsCall_vi_0 $jsCall_vi_1 $jsCall_vi_2 $jsCall_viii_0 $jsCall_viii_1 $jsCall_viii_2) - (global $global$0 (mut i32) (i32.const 66112)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66112)) (global $global$2 i32 (i32.const 568)) (export "memory" (memory $0)) diff --git a/test/lld/reserved_func_ptr.wast.out b/test/lld/reserved_func_ptr.wast.out index 1c448d4ed..7c80307b4 100644 --- a/test/lld/reserved_func_ptr.wast.out +++ b/test/lld/reserved_func_ptr.wast.out @@ -8,11 +8,12 @@ (type $6 (func (param i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$viii (func (param i32 i32 i32))) + (import "env" "STACKTOP" (global $stack$init i32)) (import "env" "_Z4atoiPKc" (func $_Z4atoiPKc (param i32) (result i32))) (memory $0 2) (table $0 3 3 anyfunc) (elem (i32.const 1) $_Z18address_taken_funciii $_Z19address_taken_func2iii) - (global $global$0 (mut i32) (i32.const 66112)) + (global $global$0 (mut i32) (get_global $stack$init)) (global $global$1 i32 (i32.const 66112)) (global $global$2 i32 (i32.const 568)) (export "memory" (memory $0)) |