mirror of
https://github.com/pezkuwichain/wasm-instrument.git
synced 2026-06-19 15:41:01 +00:00
Add gas test confirming that br instructions do not end blocks.
This commit is contained in:
Vendored
+27
@@ -0,0 +1,27 @@
|
||||
(module
|
||||
(func $fibonacci_with_break (result i32)
|
||||
(local $x i32) (local $y i32)
|
||||
|
||||
(block $unrolled_loop
|
||||
(set_local $x (i32.const 0))
|
||||
(set_local $y (i32.const 1))
|
||||
|
||||
get_local $x
|
||||
get_local $y
|
||||
tee_local $x
|
||||
i32.add
|
||||
set_local $y
|
||||
|
||||
i32.const 1
|
||||
br_if $unrolled_loop
|
||||
|
||||
get_local $x
|
||||
get_local $y
|
||||
tee_local $x
|
||||
i32.add
|
||||
set_local $y
|
||||
)
|
||||
|
||||
get_local $y
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user