summaryrefslogtreecommitdiff
path: root/test/lld/longjmp.wat.out
diff options
context:
space:
mode:
Diffstat (limited to 'test/lld/longjmp.wat.out')
-rw-r--r--test/lld/longjmp.wat.out223
1 files changed, 223 insertions, 0 deletions
diff --git a/test/lld/longjmp.wat.out b/test/lld/longjmp.wat.out
new file mode 100644
index 000000000..1b6bbd341
--- /dev/null
+++ b/test/lld/longjmp.wat.out
@@ -0,0 +1,223 @@
+(module
+ (type $i32_=>_none (func (param i32)))
+ (type $none_=>_i32 (func (result i32)))
+ (type $i32_=>_i32 (func (param i32) (result i32)))
+ (type $i32_i32_=>_none (func (param i32 i32)))
+ (type $i32_i32_i32_=>_none (func (param i32 i32 i32)))
+ (type $none_=>_none (func))
+ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32)))
+ (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32)))
+ (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32)))
+ (import "env" "malloc" (func $fimport$0 (param i32) (result i32)))
+ (import "env" "saveSetjmp" (func $fimport$1 (param i32 i32 i32 i32) (result i32)))
+ (import "env" "getTempRet0" (func $fimport$2 (result i32)))
+ (import "env" "invoke_vii" (func $fimport$4 (param i32 i32 i32)))
+ (import "env" "testSetjmp" (func $fimport$5 (param i32 i32 i32) (result i32)))
+ (import "env" "setTempRet0" (func $fimport$6 (param i32)))
+ (import "env" "free" (func $fimport$7 (param i32)))
+ (import "env" "emscripten_longjmp" (func $fimport$8 (param i32 i32)))
+ (memory $0 2)
+ (table $0 2 2 funcref)
+ (elem (i32.const 1) $fimport$8)
+ (global $global$0 (mut i32) (i32.const 66112))
+ (global $global$1 i32 (i32.const 576))
+ (export "memory" (memory $0))
+ (export "__wasm_call_ctors" (func $0))
+ (export "main" (func $2))
+ (export "__data_end" (global $global$1))
+ (export "dynCall_vii" (func $dynCall_vii))
+ (export "stackSave" (func $stackSave))
+ (export "stackAlloc" (func $stackAlloc))
+ (export "stackRestore" (func $stackRestore))
+ (export "__growWasmMemory" (func $__growWasmMemory))
+ (func $0 (; 8 ;)
+ (nop)
+ )
+ (func $1 (; 9 ;) (result i32)
+ (local $0 i32)
+ (local $1 i32)
+ (local $2 i32)
+ (local $3 i32)
+ (i32.store
+ (local.tee $0
+ (call $fimport$0
+ (i32.const 40)
+ )
+ )
+ (i32.const 0)
+ )
+ (local.set $1
+ (call $fimport$1
+ (local.get $0)
+ (i32.const 1)
+ (local.get $0)
+ (i32.const 4)
+ )
+ )
+ (local.set $2
+ (call $fimport$2)
+ )
+ (local.set $0
+ (i32.const 0)
+ )
+ (block $label$1
+ (block $label$2
+ (loop $label$3
+ (br_if $label$2
+ (local.get $0)
+ )
+ (i32.store offset=568
+ (i32.const 0)
+ (i32.const 0)
+ )
+ (call $fimport$4
+ (i32.const 1)
+ (local.get $0)
+ (i32.const 1)
+ )
+ (local.set $0
+ (i32.load offset=568
+ (i32.const 0)
+ )
+ )
+ (i32.store offset=568
+ (i32.const 0)
+ (i32.const 0)
+ )
+ (block $label$4
+ (br_if $label$4
+ (i32.eqz
+ (local.get $0)
+ )
+ )
+ (br_if $label$4
+ (i32.eqz
+ (local.tee $3
+ (i32.load offset=572
+ (i32.const 0)
+ )
+ )
+ )
+ )
+ (br_if $label$1
+ (i32.eqz
+ (call $fimport$5
+ (i32.load
+ (local.get $0)
+ )
+ (local.get $1)
+ (local.get $2)
+ )
+ )
+ )
+ (call $fimport$6
+ (local.get $3)
+ )
+ )
+ (local.set $0
+ (call $fimport$2)
+ )
+ (br $label$3)
+ )
+ )
+ (call $fimport$7
+ (local.get $1)
+ )
+ (return
+ (i32.const 0)
+ )
+ )
+ (call $fimport$8
+ (local.get $0)
+ (local.get $3)
+ )
+ (unreachable)
+ )
+ (func $2 (; 10 ;) (param $0 i32) (param $1 i32) (result i32)
+ (call $1)
+ )
+ (func $dynCall_vii (; 11 ;) (param $fptr i32) (param $0 i32) (param $1 i32)
+ (call_indirect (type $i32_i32_=>_none)
+ (local.get $0)
+ (local.get $1)
+ (local.get $fptr)
+ )
+ )
+ (func $stackSave (; 12 ;) (result i32)
+ (global.get $global$0)
+ )
+ (func $stackAlloc (; 13 ;) (param $0 i32) (result i32)
+ (local $1 i32)
+ (global.set $global$0
+ (local.tee $1
+ (i32.and
+ (i32.sub
+ (global.get $global$0)
+ (local.get $0)
+ )
+ (i32.const -16)
+ )
+ )
+ )
+ (local.get $1)
+ )
+ (func $stackRestore (; 14 ;) (param $0 i32)
+ (global.set $global$0
+ (local.get $0)
+ )
+ )
+ (func $__growWasmMemory (; 15 ;) (param $newSize i32) (result i32)
+ (memory.grow
+ (local.get $newSize)
+ )
+ )
+)
+(;
+--BEGIN METADATA --
+{
+ "staticBump": 8,
+ "tableSize": 2,
+ "initializers": [
+ "__wasm_call_ctors"
+ ],
+ "declares": [
+ "malloc",
+ "saveSetjmp",
+ "getTempRet0",
+ "testSetjmp",
+ "setTempRet0",
+ "free",
+ "emscripten_longjmp"
+ ],
+ "externs": [
+ ],
+ "implementedFunctions": [
+ "___wasm_call_ctors",
+ "_main",
+ "_dynCall_vii",
+ "_stackSave",
+ "_stackAlloc",
+ "_stackRestore",
+ "___growWasmMemory"
+ ],
+ "exports": [
+ "__wasm_call_ctors",
+ "main",
+ "dynCall_vii",
+ "stackSave",
+ "stackAlloc",
+ "stackRestore",
+ "__growWasmMemory"
+ ],
+ "namedGlobals": {
+ "__data_end" : "576"
+ },
+ "invokeFuncs": [
+ "invoke_vii"
+ ],
+ "features": [
+ ],
+ "mainReadsParams": 0
+}
+-- END METADATA --
+;)