mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-10-26 21:49:55 +00:00
Add gas test confirming that br instructions do not end blocks.
This commit is contained in:
1 parent
89e13ee901
commit
863744b1fc
6 files changed
+65
-7
No files matched your search
@@ -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