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
+20
View File
@@ -0,0 +1,20 @@
(module
(func $add_locals (param $x i32) (param $y i32) (result i32)
(local $t i32)
;; This looks
get_local $x
get_local $y
call $add
set_local $t
get_local $t
)
(func $add (param $x i32) (param $y i32) (result i32)
(i32.add
(get_local $x)
(get_local $y)
)
)
)
+9
View File
@@ -0,0 +1,9 @@
(module
(func (param $x i32) (result i32)
(if (result i32)
(i32.const 1)
(i32.add (get_local $x) (i32.const 1))
(i32.popcnt (get_local $x))
)
)
)