summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck.py2
-rw-r--r--test/dot_s/basics.wast47
2 files changed, 48 insertions, 1 deletions
diff --git a/check.py b/check.py
index 65d0549e9..85b96f71e 100755
--- a/check.py
+++ b/check.py
@@ -214,7 +214,7 @@ for t in spec_tests:
print '\n[ checking .s testcases... ]\n'
-for s in ['minimal.s']:
+for s in ['minimal.s', 'basics.s']:
print '..', s
wasm = s.replace('.s', '.wast')
actual, err = subprocess.Popen([os.path.join('bin', 's2wasm'), os.path.join('test', 'dot_s', s)], stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
diff --git a/test/dot_s/basics.wast b/test/dot_s/basics.wast
new file mode 100644
index 000000000..a9bbf0557
--- /dev/null
+++ b/test/dot_s/basics.wast
@@ -0,0 +1,47 @@
+(module
+ (memory 0 4294967295)
+ (func $0 (param $$0 i32) (param $$1 i32) (result i32)
+ (block $fake_return_waka123
+ (block
+ (call $puts
+ (none.const ?)
+ )
+ (block $BB0_5
+ (block $BB0_4
+ (br_if
+ (i32.ne
+ (i32.sub
+ (i32.and
+ (i32.add
+ (i32.shr_u
+ (i32.shr_s
+ (i32.const 31)
+ (get_local $$0)
+ )
+ (i32.const 30)
+ )
+ (get_local $$0)
+ )
+ (i32.const -4)
+ )
+ (get_local $$0)
+ )
+ (i32.const 1)
+ )
+ $BB0_4
+ )
+ (set_local $$0
+ (i32.add
+ (i32.const -12)
+ (get_local $$0)
+ )
+ )
+ )
+ (br $fake_return_waka123
+ (get_local $$0)
+ )
+ )
+ )
+ )
+ )
+)