summaryrefslogtreecommitdiff
path: root/test/dot_s/basics.wast
diff options
context:
space:
mode:
Diffstat (limited to 'test/dot_s/basics.wast')
-rw-r--r--test/dot_s/basics.wast95
1 files changed, 95 insertions, 0 deletions
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
new file mode 100644
index 000000000..88adfaf58
--- /dev/null
+++ b/test/dot_s/basics.wast
@@ -0,0 +1,95 @@
+(module
+ (memory 0 4294967295 (segment 16 "hello, world!\n\00"))
+ (import $puts "env" "puts")
+ (export "main" $main)
+ (func $main (param $$0 i32) (param $$1 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (call_import $puts
+ (i32.const 16)
+ )
+ (block $BB0_5
+ (block $BB0_4
+ (br_if
+ (i32.ne
+ (i32.sub
+ (get_local $$0)
+ (i32.and
+ (i32.add
+ (get_local $$0)
+ (i32.shr_u
+ (i32.shr_s
+ (get_local $$0)
+ (i32.const 31)
+ )
+ (i32.const 30)
+ )
+ )
+ (i32.const -4)
+ )
+ )
+ (i32.const 1)
+ )
+ $BB0_4
+ )
+ (loop $BB0_1
+ (block
+ (set_local $$0
+ (i32.add
+ (i32.gt_s
+ (get_local $$0)
+ (i32.const 10)
+ )
+ (get_local $$0)
+ )
+ )
+ (block $BB0_3
+ (br_if
+ (i32.ne
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 5)
+ )
+ (i32.const 3)
+ )
+ $BB0_3
+ )
+ (set_local $$0
+ (i32.add
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 111)
+ )
+ (get_local $$0)
+ )
+ )
+ )
+ (br_if
+ (i32.eq
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 7)
+ )
+ (i32.const 0)
+ )
+ $BB0_5
+ )
+ (br $BB0_1)
+ )
+ )
+ )
+ (set_local $$0
+ (i32.add
+ (get_local $$0)
+ (i32.const -12)
+ )
+ )
+ )
+ (br $fake_return_waka123
+ (get_local $$0)
+ )
+ )
+ )
+ )
+)
+;; METADATA: { "asmConsts": {} } \ No newline at end of file