mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-14 00:31:17 +00:00
A couple of small tests.
This commit is contained in:
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