mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-13 01:11:06 +00:00
A couple of small tests.
This commit is contained in:
@@ -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))
|
||||
@@ -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))
|
||||
Reference in New Issue
Block a user