summaryrefslogtreecommitdiff
path: root/test/dot_s
diff options
context:
space:
mode:
Diffstat (limited to 'test/dot_s')
-rw-r--r--test/dot_s/alias.wast14
-rw-r--r--test/dot_s/asm_const.wast14
-rw-r--r--test/dot_s/basics.wast126
-rw-r--r--test/dot_s/bcp-1.wast136
-rw-r--r--test/dot_s/function-data-sections.wast26
-rw-r--r--test/dot_s/macClangMetaData.wast14
-rw-r--r--test/dot_s/memops.wast312
-rw-r--r--test/dot_s/minimal.wast8
-rw-r--r--test/dot_s/relocation.wast10
-rw-r--r--test/dot_s/symbolic-offset.wast12
-rw-r--r--test/dot_s/visibilities.wast18
11 files changed, 279 insertions, 411 deletions
diff --git a/test/dot_s/alias.wast b/test/dot_s/alias.wast
index 41fb16f75..f1a21dfc9 100644
--- a/test/dot_s/alias.wast
+++ b/test/dot_s/alias.wast
@@ -4,19 +4,11 @@
(export "__needs_exit" $__needs_exit)
(func $__exit
(local $$0 i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123)
- )
- )
+ (return)
)
(func $__needs_exit
- (block $fake_return_waka123
- (block
- (call $__exit)
- (br $fake_return_waka123)
- )
- )
+ (call $__exit)
+ (return)
)
)
;; METADATA: { "asmConsts": {},"staticBump": 4 }
diff --git a/test/dot_s/asm_const.wast b/test/dot_s/asm_const.wast
index d0e11f86c..1bd4fc92b 100644
--- a/test/dot_s/asm_const.wast
+++ b/test/dot_s/asm_const.wast
@@ -6,15 +6,11 @@
(import $_emscripten_asm_const_vi "env" "_emscripten_asm_const_vi" (param i32))
(export "main" $main)
(func $main (result i32)
- (block $fake_return_waka123
- (block
- (call_import $_emscripten_asm_const_vi
- (i32.const 0)
- )
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (call_import $_emscripten_asm_const_vi
+ (i32.const 0)
+ )
+ (return
+ (i32.const 0)
)
)
)
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
index fea2948b3..b21d1a2e7 100644
--- a/test/dot_s/basics.wast
+++ b/test/dot_s/basics.wast
@@ -9,91 +9,87 @@
(export "main" $main)
(table $main)
(func $main (param $$0 i32) (param $$1 i32) (result i32)
- (block $fake_return_waka123
- (block
- (call_import $puts
- (i32.const 16)
- )
- (block $label$0
- (block $label$1
- (br_if
- (i32.ne
- (i32.sub
+ (call_import $puts
+ (i32.const 16)
+ )
+ (block $label$0
+ (block $label$1
+ (br_if
+ (i32.ne
+ (i32.sub
+ (get_local $$0)
+ (i32.and
+ (i32.add
(get_local $$0)
- (i32.and
- (i32.add
+ (i32.shr_u
+ (i32.shr_s
(get_local $$0)
- (i32.shr_u
- (i32.shr_s
- (get_local $$0)
- (i32.const 31)
- )
- (i32.const 30)
- )
+ (i32.const 31)
)
- (i32.const -4)
+ (i32.const 30)
)
)
- (i32.const 1)
+ (i32.const -4)
)
- $label$1
)
- (loop $label$3 $label$2
- (set_local $$0
- (i32.add
- (i32.gt_s
- (get_local $$0)
- (i32.const 10)
- )
- (get_local $$0)
- )
+ (i32.const 1)
+ )
+ $label$1
+ )
+ (loop $label$3 $label$2
+ (set_local $$0
+ (i32.add
+ (i32.gt_s
+ (get_local $$0)
+ (i32.const 10)
)
- (block $label$4
- (br_if
- (i32.ne
- (i32.rem_s
- (get_local $$0)
- (i32.const 5)
- )
- (i32.const 3)
- )
- $label$4
- )
- (set_local $$0
- (i32.add
- (i32.rem_s
- (get_local $$0)
- (i32.const 111)
- )
- (get_local $$0)
- )
+ (get_local $$0)
+ )
+ )
+ (block $label$4
+ (br_if
+ (i32.ne
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 5)
)
+ (i32.const 3)
)
- (br_if
- (i32.eq
- (i32.rem_s
- (get_local $$0)
- (i32.const 7)
- )
- (i32.const 0)
+ $label$4
+ )
+ (set_local $$0
+ (i32.add
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 111)
)
- $label$1
+ (get_local $$0)
)
- (br $label$2)
)
)
- (set_local $$0
- (i32.add
- (get_local $$0)
- (i32.const -12)
+ (br_if
+ (i32.eq
+ (i32.rem_s
+ (get_local $$0)
+ (i32.const 7)
+ )
+ (i32.const 0)
)
+ $label$1
)
- (i32.const 0)
+ (br $label$2)
)
- (br $fake_return_waka123
+ )
+ (set_local $$0
+ (i32.add
(get_local $$0)
+ (i32.const -12)
)
)
+ (i32.const 0)
+ )
+ (return
+ (get_local $$0)
)
)
)
diff --git a/test/dot_s/bcp-1.wast b/test/dot_s/bcp-1.wast
index af8cc92ec..224bd9cf7 100644
--- a/test/dot_s/bcp-1.wast
+++ b/test/dot_s/bcp-1.wast
@@ -34,156 +34,88 @@
(export "main" $main)
(table $bad0 $bad1 $bad5 $bad7 $bad8 $bad10 $bad2 $bad3 $bad6 $bad4 $bad9 $good0 $good1 $good2 $opt0 $opt1 $opt2)
(func $bad0 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad1 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad2 (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad3 (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad4 (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad5 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad6 (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad7 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad8 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad9 (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $bad10 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $good0 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 1)
- )
- )
+ (return
+ (i32.const 1)
)
)
(func $good1 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 1)
- )
- )
+ (return
+ (i32.const 1)
)
)
(func $good2 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 1)
- )
- )
+ (return
+ (i32.const 1)
)
)
(func $opt0 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $opt1 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (return
+ (i32.const 0)
)
)
(func $opt2 (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 1)
- )
- )
+ (return
+ (i32.const 1)
)
)
(func $main (result i32)
diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast
index 5f31aa3eb..b1d8ec714 100644
--- a/test/dot_s/function-data-sections.wast
+++ b/test/dot_s/function-data-sections.wast
@@ -8,30 +8,18 @@
(export "bar" $bar)
(export "qux" $qux)
(func $foo
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123)
- )
- )
+ (return)
)
(func $bar (param $$0 i32) (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (get_local $$0)
- )
- )
+ (return
+ (get_local $$0)
)
)
(func $qux (param $$0 f64) (param $$1 f64) (result f64)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (f64.add
- (get_local $$0)
- (get_local $$1)
- )
- )
+ (return
+ (f64.add
+ (get_local $$0)
+ (get_local $$1)
)
)
)
diff --git a/test/dot_s/macClangMetaData.wast b/test/dot_s/macClangMetaData.wast
index fd3210139..fbefd754f 100644
--- a/test/dot_s/macClangMetaData.wast
+++ b/test/dot_s/macClangMetaData.wast
@@ -6,15 +6,11 @@
(import $puts "env" "puts" (param i32) (result i32))
(export "main" $main)
(func $main (param $$0 i32) (param $$1 i32) (result i32)
- (block $fake_return_waka123
- (block
- (call_import $puts
- (i32.const 16)
- )
- (br $fake_return_waka123
- (i32.const 0)
- )
- )
+ (call_import $puts
+ (i32.const 16)
+ )
+ (return
+ (i32.const 0)
)
)
)
diff --git a/test/dot_s/memops.wast b/test/dot_s/memops.wast
index 0f7e81068..647abbc48 100644
--- a/test/dot_s/memops.wast
+++ b/test/dot_s/memops.wast
@@ -7,18 +7,14 @@
(export "_Z6reporti" $_Z6reporti)
(export "main" $main)
(func $_Z6reporti (param $$0 i32)
- (block $fake_return_waka123
- (block
- (i32.store align=4
- (i32.const 8)
- (get_local $$0)
- )
- (call_import $_emscripten_asm_const_vi
- (i32.const 0)
- )
- (br $fake_return_waka123)
- )
+ (i32.store align=4
+ (i32.const 8)
+ (get_local $$0)
+ )
+ (call_import $_emscripten_asm_const_vi
+ (i32.const 0)
)
+ (return)
)
(func $main (result i32)
(local $$0 i32)
@@ -34,186 +30,182 @@
(local $$10 i32)
(local $$11 i32)
(local $$12 i32)
- (block $fake_return_waka123
- (block
- (set_local $$7
+ (set_local $$7
+ (i32.const 0)
+ )
+ (set_local $$7
+ (i32.load align=4
+ (get_local $$7)
+ )
+ )
+ (set_local $$8
+ (i32.const 1048576)
+ )
+ (set_local $$12
+ (i32.sub
+ (get_local $$7)
+ (get_local $$8)
+ )
+ )
+ (set_local $$8
+ (i32.const 0)
+ )
+ (set_local $$12
+ (i32.store align=4
+ (get_local $$8)
+ (get_local $$12)
+ )
+ )
+ (set_local $$1
+ (i32.const 0)
+ )
+ (set_local $$0
+ (get_local $$1)
+ )
+ (set_local $$6
+ (get_local $$1)
+ )
+ (loop $label$1 $label$0
+ (set_local $$4
+ (get_local $$1)
+ )
+ (loop $label$3 $label$2
+ (set_local $$10
(i32.const 0)
)
- (set_local $$7
- (i32.load align=4
- (get_local $$7)
+ (set_local $$10
+ (i32.add
+ (get_local $$12)
+ (get_local $$10)
)
)
- (set_local $$8
- (i32.const 1048576)
- )
- (set_local $$12
- (i32.sub
- (get_local $$7)
- (get_local $$8)
+ (i32.store align=8
+ (i32.add
+ (get_local $$10)
+ (get_local $$4)
+ )
+ (i32.add
+ (get_local $$6)
+ (get_local $$4)
)
)
- (set_local $$8
- (i32.const 0)
+ (set_local $$2
+ (i32.const 1)
)
- (set_local $$12
- (i32.store align=4
- (get_local $$8)
- (get_local $$12)
+ (set_local $$4
+ (i32.add
+ (get_local $$4)
+ (get_local $$2)
)
)
- (set_local $$1
- (i32.const 0)
+ (set_local $$3
+ (i32.const 1048576)
)
- (set_local $$0
+ (set_local $$5
(get_local $$1)
)
- (set_local $$6
- (get_local $$1)
- )
- (loop $label$1 $label$0
- (set_local $$4
- (get_local $$1)
- )
- (loop $label$3 $label$2
- (set_local $$10
- (i32.const 0)
- )
- (set_local $$10
- (i32.add
- (get_local $$12)
- (get_local $$10)
- )
- )
- (i32.store align=8
- (i32.add
- (get_local $$10)
- (get_local $$4)
- )
- (i32.add
- (get_local $$6)
- (get_local $$4)
- )
- )
- (set_local $$2
- (i32.const 1)
- )
- (set_local $$4
- (i32.add
- (get_local $$4)
- (get_local $$2)
- )
- )
- (set_local $$3
- (i32.const 1048576)
- )
- (set_local $$5
- (get_local $$1)
- )
- (br_if
- (i32.ne
- (get_local $$4)
- (get_local $$3)
- )
- $label$2
- )
+ (br_if
+ (i32.ne
+ (get_local $$4)
+ (get_local $$3)
)
- (loop $label$5 $label$4
- (set_local $$11
- (i32.const 0)
- )
- (set_local $$11
- (i32.add
- (get_local $$12)
- (get_local $$11)
- )
- )
- (set_local $$6
- (i32.add
- (i32.and
- (i32.load8_u align=1
- (i32.add
- (get_local $$11)
- (get_local $$5)
- )
- )
- (get_local $$2)
- )
- (get_local $$6)
- )
- )
- (set_local $$5
- (i32.add
- (get_local $$5)
- (get_local $$2)
- )
- )
- (br_if
- (i32.ne
- (get_local $$5)
- (get_local $$3)
- )
- $label$4
- )
+ $label$2
+ )
+ )
+ (loop $label$5 $label$4
+ (set_local $$11
+ (i32.const 0)
+ )
+ (set_local $$11
+ (i32.add
+ (get_local $$12)
+ (get_local $$11)
)
- (set_local $$6
+ )
+ (set_local $$6
+ (i32.add
(i32.and
- (i32.add
+ (i32.load8_u align=1
(i32.add
- (i32.mul
- (get_local $$6)
- (i32.const 3)
- )
- (i32.div_s
- (get_local $$6)
- (i32.const 5)
- )
+ (get_local $$11)
+ (get_local $$5)
)
- (i32.const 17)
)
- (i32.const 65535)
- )
- )
- (set_local $$0
- (i32.add
- (get_local $$0)
(get_local $$2)
)
+ (get_local $$6)
)
- (br_if
- (i32.ne
- (get_local $$0)
- (i32.const 100)
- )
- $label$0
- )
- )
- (call $_Z6reporti
- (get_local $$6)
)
- (set_local $$9
- (i32.const 1048576)
- )
- (set_local $$12
+ (set_local $$5
(i32.add
- (get_local $$12)
- (get_local $$9)
+ (get_local $$5)
+ (get_local $$2)
)
)
- (set_local $$9
- (i32.const 0)
+ (br_if
+ (i32.ne
+ (get_local $$5)
+ (get_local $$3)
+ )
+ $label$4
)
- (set_local $$12
- (i32.store align=4
- (get_local $$9)
- (get_local $$12)
+ )
+ (set_local $$6
+ (i32.and
+ (i32.add
+ (i32.add
+ (i32.mul
+ (get_local $$6)
+ (i32.const 3)
+ )
+ (i32.div_s
+ (get_local $$6)
+ (i32.const 5)
+ )
+ )
+ (i32.const 17)
)
+ (i32.const 65535)
)
- (br $fake_return_waka123
- (i32.const 0)
+ )
+ (set_local $$0
+ (i32.add
+ (get_local $$0)
+ (get_local $$2)
+ )
+ )
+ (br_if
+ (i32.ne
+ (get_local $$0)
+ (i32.const 100)
)
+ $label$0
+ )
+ )
+ (call $_Z6reporti
+ (get_local $$6)
+ )
+ (set_local $$9
+ (i32.const 1048576)
+ )
+ (set_local $$12
+ (i32.add
+ (get_local $$12)
+ (get_local $$9)
+ )
+ )
+ (set_local $$9
+ (i32.const 0)
+ )
+ (set_local $$12
+ (i32.store align=4
+ (get_local $$9)
+ (get_local $$12)
)
)
+ (return
+ (i32.const 0)
+ )
)
)
;; METADATA: { "asmConsts": {"0": ["{ Module.print(\"hello, world! \" + HEAP32[8>>2]); }", ["vi"]]},"staticBump": 66 }
diff --git a/test/dot_s/minimal.wast b/test/dot_s/minimal.wast
index 6a8f3aa6f..ebaa20597 100644
--- a/test/dot_s/minimal.wast
+++ b/test/dot_s/minimal.wast
@@ -2,12 +2,8 @@
(memory 0 4294967295)
(export "main" $main)
(func $main (result i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.const 5)
- )
- )
+ (return
+ (i32.const 5)
)
)
)
diff --git a/test/dot_s/relocation.wast b/test/dot_s/relocation.wast
index 7a1b419b4..343269270 100644
--- a/test/dot_s/relocation.wast
+++ b/test/dot_s/relocation.wast
@@ -6,13 +6,9 @@
(export "main" $main)
(func $main (result i32)
(local $$0 i32)
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123
- (i32.load align=4
- (i32.const 12)
- )
- )
+ (return
+ (i32.load align=4
+ (i32.const 12)
)
)
)
diff --git a/test/dot_s/symbolic-offset.wast b/test/dot_s/symbolic-offset.wast
index 2d39c19ea..cd0681c31 100644
--- a/test/dot_s/symbolic-offset.wast
+++ b/test/dot_s/symbolic-offset.wast
@@ -4,15 +4,11 @@
)
(export "f" $f)
(func $f (param $$0 i32) (param $$1 i32)
- (block $fake_return_waka123
- (block
- (i32.store offset=12 align=4
- (get_local $$0)
- (get_local $$1)
- )
- (br $fake_return_waka123)
- )
+ (i32.store offset=12 align=4
+ (get_local $$0)
+ (get_local $$1)
)
+ (return)
)
)
;; METADATA: { "asmConsts": {},"staticBump": 19 }
diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast
index 6b346270e..eb9c24a7c 100644
--- a/test/dot_s/visibilities.wast
+++ b/test/dot_s/visibilities.wast
@@ -4,25 +4,13 @@
(export "bar" $bar)
(export "qux" $qux)
(func $foo
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123)
- )
- )
+ (return)
)
(func $bar
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123)
- )
- )
+ (return)
)
(func $qux
- (block $fake_return_waka123
- (block
- (br $fake_return_waka123)
- )
- )
+ (return)
)
)
;; METADATA: { "asmConsts": {},"staticBump": 4 }