summaryrefslogtreecommitdiff
path: root/test/dot_s/reg-stackify.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/dot_s/reg-stackify.wast')
-rw-r--r--test/dot_s/reg-stackify.wast115
1 files changed, 115 insertions, 0 deletions
diff --git a/test/dot_s/reg-stackify.wast b/test/dot_s/reg-stackify.wast
new file mode 100644
index 000000000..c55af3d38
--- /dev/null
+++ b/test/dot_s/reg-stackify.wast
@@ -0,0 +1,115 @@
+(module
+ (memory 0 4294967295)
+ (func $no0 (param $$0 i32) (param $$1 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (set_local $$1
+ (i32.load align=4
+ (get_local $$1)
+ )
+ )
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 0)
+ )
+ (br $fake_return_waka123
+ (get_local $$1)
+ )
+ )
+ )
+ )
+ (func $no1 (param $$0 i32) (param $$1 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (set_local $$1
+ (i32.load align=4
+ (get_local $$1)
+ )
+ )
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 0)
+ )
+ (br $fake_return_waka123
+ (get_local $$1)
+ )
+ )
+ )
+ )
+ (func $yes0 (param $$0 i32) (param $$1 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (i32.store align=4
+ (get_local $$0)
+ (i32.const 0)
+ )
+ (br $fake_return_waka123
+ (i32.load align=4
+ (get_local $$1)
+ )
+ )
+ )
+ )
+ )
+ (func $yes1 (param $$0 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (br $fake_return_waka123
+ (i32.load align=4
+ (get_local $$0)
+ )
+ )
+ )
+ )
+ )
+ (func $stack_uses (param $$0 i32) (param $$1 i32) (param $$2 i32) (param $$3 i32) (result i32)
+ (local $$4 i32)
+ (local $$5 i32)
+ (block $fake_return_waka123
+ (block
+ (set_local $$4
+ (i32.const 1)
+ )
+ (set_local $$5
+ (i32.const 2)
+ )
+ (block $BB4_2
+ (br_if
+ (i32.ne
+ (get_local $$4)
+ (i32.xor
+ (i32.xor
+ (i32.lt_s
+ (get_local $$4)
+ (get_local $$0)
+ )
+ (i32.lt_s
+ (get_local $$5)
+ (get_local $$1)
+ )
+ )
+ (i32.xor
+ (i32.lt_s
+ (get_local $$4)
+ (get_local $$2)
+ )
+ (i32.lt_s
+ (get_local $$5)
+ (get_local $$3)
+ )
+ )
+ )
+ )
+ $BB4_2
+ )
+ (br $fake_return_waka123
+ (i32.const 0)
+ )
+ )
+ (br $fake_return_waka123
+ (get_local $$4)
+ )
+ )
+ )
+ )
+)