A couple of small tests.

This commit is contained in:
Sergey Pepyakin
2019-04-03 14:24:01 +02:00
parent b1fbd2921e
commit 1b7a5d26ea
5 changed files with 71 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
(module
(type (;0;) (func (param i32 i32) (result i32)))
(type (;1;) (func (param i32)))
(import "env" "gas" (func (;0;) (type 1)))
(func (;1;) (type 0) (param i32 i32) (result i32)
(local i32)
i32.const 6
call 0
get_local 0
get_local 1
call 2
set_local 2
get_local 2)
(func (;2;) (type 0) (param i32 i32) (result i32)
i32.const 4
call 0
get_local 0
get_local 1
i32.add))
+20
View File
@@ -0,0 +1,20 @@
(module
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32)))
(import "env" "gas" (func (;0;) (type 1)))
(func (;1;) (type 0) (param i32) (result i32)
i32.const 3
call 0
i32.const 1
if (result i32) ;; label = @1
i32.const 4
call 0
get_local 0
i32.const 1
i32.add
else
i32.const 3
call 0
get_local 0
i32.popcnt
end))