mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-11-15 15:17:12 +00:00
A couple of small tests.
This commit is contained in:
1 parent
b1fbd2921e
commit
1b7a5d26ea
5 files changed
+71
No files matched your search
Vendored
+20
@@ -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)
|
||||
)
|
||||
)
|
||||
)
|
||||
Vendored
+9
@@ -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))
|
||||
)
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user