Indent loops, ifs etc

This commit is contained in:
2026-02-28 13:10:05 +00:00
parent aceeebd3ff
commit 95d82a91c2

View File

@@ -586,13 +586,13 @@
(func $key (local $head i32)
;; Wait for RXBUF to be non-empty
loop $wait
global.get $RXHEAD
i32.atomic.load8_u
local.tee $head
global.get $RXTAIL
i32.atomic.load8_u
i32.eq
br_if $wait
global.get $RXHEAD
i32.atomic.load8_u
local.tee $head
global.get $RXTAIL
i32.atomic.load8_u
i32.eq
br_if $wait
end
;; Read byte at head position
@@ -616,18 +616,18 @@
(func $emit (local $tail i32) (local $next i32)
;; Wait for TXBUF to be non-full
loop $wait
global.get $TXTAIL
i32.atomic.load8_u
local.tee $tail
i32.const 1
i32.add
i32.const 0x1f
i32.and
local.tee $next
global.get $TXHEAD
i32.atomic.load8_u
i32.eq
br_if $wait
global.get $TXTAIL
i32.atomic.load8_u
local.tee $tail
i32.const 1
i32.add
i32.const 0x1f
i32.and
local.tee $next
global.get $TXHEAD
i32.atomic.load8_u
i32.eq
br_if $wait
end
;; Write byte at tail position
@@ -657,10 +657,10 @@
(func $zbranch
call $pop
if (result i32)
i32.const 4
i32.const 4
else
global.get $ip
i32.load
global.get $ip
i32.load
end
global.get $ip
i32.add
@@ -1685,9 +1685,9 @@
(func $trampoline
loop $loop
global.get $fn
call_indirect (type $codeword)
br $loop
global.get $fn
call_indirect (type $codeword)
br $loop
end)
(func (export "reset")