summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2015-12-11 17:58:16 -0500
committerAlon Zakai <alonzakai@gmail.com>2015-12-11 17:58:16 -0500
commit7fbb349bde8ede4542b81b14cea52dcc3e93a02d (patch)
tree12d308834c37f29501bf8270cbd4f91cea062b57 /test
parent8fe1dcbf33748b18d309cebe5f8b70e64e39a996 (diff)
downloadbinaryen-7fbb349bde8ede4542b81b14cea52dcc3e93a02d.tar.gz
binaryen-7fbb349bde8ede4542b81b14cea52dcc3e93a02d.tar.bz2
binaryen-7fbb349bde8ede4542b81b14cea52dcc3e93a02d.zip
add the loop in s2wasm
Diffstat (limited to 'test')
-rw-r--r--test/dot_s/basics.wast45
1 files changed, 45 insertions, 0 deletions
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
index 192fe3dbc..db607575e 100644
--- a/test/dot_s/basics.wast
+++ b/test/dot_s/basics.wast
@@ -30,6 +30,51 @@
)
$BB0_4
)
+ (loop $BB0_1 $BB0_4
+ (block
+ (set_local $$0
+ (i32.add
+ (get_local $$0)
+ (i32.gt_s
+ (i32.const 10)
+ (get_local $$0)
+ )
+ )
+ )
+ (block $BB0_3
+ (br_if
+ (i32.ne
+ (i32.rem_s
+ (i32.const 5)
+ (get_local $$0)
+ )
+ (i32.const 3)
+ )
+ $BB0_3
+ )
+ (set_local $$0
+ (i32.add
+ (get_local $$0)
+ (i32.rem_s
+ (i32.const 111)
+ (get_local $$0)
+ )
+ )
+ )
+ )
+ (br_if
+ (i32.eq
+ (i32.rem_s
+ (i32.const 7)
+ (get_local $$0)
+ )
+ (i32.const 0)
+ )
+ $BB0_5
+ )
+ (br $BB0_1)
+ )
+ )
)
(set_local $$0
(i32.add