diff options
Diffstat (limited to 'test/lld/safe_stack_standalone-wasm.wat.out')
-rw-r--r-- | test/lld/safe_stack_standalone-wasm.wat.out | 88 |
1 files changed, 62 insertions, 26 deletions
diff --git a/test/lld/safe_stack_standalone-wasm.wat.out b/test/lld/safe_stack_standalone-wasm.wat.out index 48ea2be68..51b88661b 100644 --- a/test/lld/safe_stack_standalone-wasm.wat.out +++ b/test/lld/safe_stack_standalone-wasm.wat.out @@ -2,6 +2,7 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (import "env" "printf" (func $printf (param i32 i32) (result i32))) @@ -11,6 +12,7 @@ (global $global$0 (mut i32) (i32.const 66128)) (global $global$1 i32 (i32.const 66128)) (global $global$2 i32 (i32.const 587)) + (global $__stack_base (mut i32) (i32.const 0)) (global $__stack_limit (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "__wasm_call_ctors" (func $__wasm_call_ctors)) @@ -18,6 +20,7 @@ (export "__data_end" (global $global$2)) (export "main" (func $main)) (export "__set_stack_limit" (func $__set_stack_limit)) + (export "__set_stack_limits" (func $__set_stack_limits)) (export "__growWasmMemory" (func $__growWasmMemory)) (func $__wasm_call_ctors (nop) @@ -28,16 +31,22 @@ (local $4 i32) (block (if - (i32.lt_u - (local.tee $3 - (local.tee $2 - (i32.sub - (global.get $global$0) - (i32.const 16) + (i32.or + (i32.gt_u + (local.tee $3 + (local.tee $2 + (i32.sub + (global.get $global$0) + (i32.const 16) + ) ) ) + (global.get $__stack_base) + ) + (i32.lt_u + (local.get $3) + (global.get $__stack_limit) ) - (global.get $__stack_limit) ) (unreachable) ) @@ -61,14 +70,20 @@ ) (block (if - (i32.lt_u - (local.tee $4 - (i32.add - (local.get $2) - (i32.const 16) + (i32.or + (i32.gt_u + (local.tee $4 + (i32.add + (local.get $2) + (i32.const 16) + ) ) + (global.get $__stack_base) + ) + (i32.lt_u + (local.get $4) + (global.get $__stack_limit) ) - (global.get $__stack_limit) ) (unreachable) ) @@ -87,16 +102,22 @@ (local $2 i32) (block (if - (i32.lt_u - (local.tee $1 - (local.tee $0 - (i32.sub - (global.get $global$0) - (i32.const 16) + (i32.or + (i32.gt_u + (local.tee $1 + (local.tee $0 + (i32.sub + (global.get $global$0) + (i32.const 16) + ) ) ) + (global.get $__stack_base) + ) + (i32.lt_u + (local.get $1) + (global.get $__stack_limit) ) - (global.get $__stack_limit) ) (unreachable) ) @@ -119,14 +140,20 @@ ) (block (if - (i32.lt_u - (local.tee $2 - (i32.add - (local.get $0) - (i32.const 16) + (i32.or + (i32.gt_u + (local.tee $2 + (i32.add + (local.get $0) + (i32.const 16) + ) ) + (global.get $__stack_base) + ) + (i32.lt_u + (local.get $2) + (global.get $__stack_limit) ) - (global.get $__stack_limit) ) (unreachable) ) @@ -144,6 +171,14 @@ (local.get $0) ) ) + (func $__set_stack_limits (param $0 i32) (param $1 i32) + (global.set $__stack_base + (local.get $0) + ) + (global.set $__stack_limit + (local.get $1) + ) + ) (func $__growWasmMemory (param $newSize i32) (result i32) (memory.grow (local.get $newSize) @@ -167,6 +202,7 @@ "__wasm_call_ctors", "main", "__set_stack_limit", + "__set_stack_limits", "__growWasmMemory" ], "namedGlobals": { |