summaryrefslogtreecommitdiff
path: root/test/lit/passes/stack-check-memory64.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/lit/passes/stack-check-memory64.wast')
-rw-r--r--test/lit/passes/stack-check-memory64.wast34
1 files changed, 23 insertions, 11 deletions
diff --git a/test/lit/passes/stack-check-memory64.wast b/test/lit/passes/stack-check-memory64.wast
index 201910f36..137b156de 100644
--- a/test/lit/passes/stack-check-memory64.wast
+++ b/test/lit/passes/stack-check-memory64.wast
@@ -39,7 +39,9 @@
;; CHECK-NEXT: (global.get $__stack_limit)
;; CHECK-NEXT: )
;; CHECK-NEXT: )
- ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: (then
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
;; CHECK-NEXT: )
;; CHECK-NEXT: (global.set $sp
;; CHECK-NEXT: (local.get $0)
@@ -63,30 +65,40 @@
(module
;; if the global names are taken we should not crash
(memory i64 (data))
- ;; CHECK: (type $0 (func (param i64 i64)))
+ ;; CHECK: (type $0 (func (result i64)))
+
+ ;; CHECK: (type $1 (func (param i64 i64)))
;; CHECK: (global $sp (mut i64) (i64.const 0))
- (global $sp (mut i64) (i64.const 0)))
+ (global $sp (mut i64) (i64.const 0))
;; CHECK: (global $__stack_base (mut i64) (i64.const 0))
(global $__stack_base (mut i64) (i64.const 0))
;; CHECK: (global $__stack_limit (mut i64) (i64.const 0))
(global $__stack_limit (mut i64) (i64.const 0))
+ ;; CHECK: (global $__stack_base_3 (mut i64) (i64.const 0))
+
+ ;; CHECK: (global $__stack_limit_3 (mut i64) (i64.const 0))
+
+ ;; CHECK: (memory $0 i64 0 65536)
+
+ ;; CHECK: (data $0 (i64.const 0) "")
+
+ ;; CHECK: (export "use_stack" (func $0))
(export "use_stack" (func $0))
+ ;; CHECK: (export "__set_stack_limits" (func $__set_stack_limits))
+
+ ;; CHECK: (func $0 (result i64)
+ ;; CHECK-NEXT: (unreachable)
+ ;; CHECK-NEXT: )
(func $0 (result i64)
(unreachable)
)
)
-;; CHECK: (memory $0 i64 0 65536)
-
-;; CHECK: (data $0 (i64.const 0) "")
-
-;; CHECK: (export "__set_stack_limits" (func $__set_stack_limits))
-
;; CHECK: (func $__set_stack_limits (param $0 i64) (param $1 i64)
-;; CHECK-NEXT: (global.set $__stack_base
+;; CHECK-NEXT: (global.set $__stack_base_3
;; CHECK-NEXT: (local.get $0)
;; CHECK-NEXT: )
-;; CHECK-NEXT: (global.set $__stack_limit
+;; CHECK-NEXT: (global.set $__stack_limit_3
;; CHECK-NEXT: (local.get $1)
;; CHECK-NEXT: )
;; CHECK-NEXT: )