mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-09 20:11:06 +00:00
Add gas test confirming that br instructions do not end blocks.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
(module
|
||||
(type (;0;) (func (result i32)))
|
||||
(type (;1;) (func (param i32)))
|
||||
(import "env" "gas" (func (;0;) (type 1)))
|
||||
(func (;1;) (type 0) (result i32)
|
||||
(local i32 i32)
|
||||
i32.const 3
|
||||
call 0
|
||||
block ;; label = @1
|
||||
i32.const 17
|
||||
call 0
|
||||
i32.const 0
|
||||
set_local 0
|
||||
i32.const 1
|
||||
set_local 1
|
||||
get_local 0
|
||||
get_local 1
|
||||
tee_local 0
|
||||
i32.add
|
||||
set_local 1
|
||||
i32.const 1
|
||||
br_if 0 (;@1;)
|
||||
get_local 0
|
||||
get_local 1
|
||||
tee_local 0
|
||||
i32.add
|
||||
set_local 1
|
||||
end
|
||||
get_local 1))
|
||||
Reference in New Issue
Block a user