Replace local set then get with tee

This commit is contained in:
2026-02-25 21:29:14 +00:00
parent eab32c9b42
commit a830998617

View File

@@ -476,8 +476,7 @@
(func $addstore (local $tmp i32) (func $addstore (local $tmp i32)
call $pop call $pop
local.set $tmp local.tee $tmp
local.get $tmp
local.get $tmp local.get $tmp
i32.load i32.load
call $pop call $pop
@@ -487,8 +486,7 @@
(func $substore (local $tmp i32) (func $substore (local $tmp i32)
call $pop call $pop
local.set $tmp local.tee $tmp
local.get $tmp
local.get $tmp local.get $tmp
i32.load i32.load
call $pop call $pop
@@ -571,8 +569,7 @@
loop $wait loop $wait
global.get $RXHEAD global.get $RXHEAD
i32.atomic.load8_u i32.atomic.load8_u
local.set $head local.tee $head
local.get $head
global.get $RXTAIL global.get $RXTAIL
i32.atomic.load8_u i32.atomic.load8_u
i32.eq i32.eq
@@ -602,14 +599,12 @@
loop $wait loop $wait
global.get $TXTAIL global.get $TXTAIL
i32.atomic.load8_u i32.atomic.load8_u
local.set $tail local.tee $tail
local.get $tail
i32.const 1 i32.const 1
i32.add i32.add
i32.const 0x1f i32.const 0x1f
i32.and i32.and
local.set $next local.tee $next
local.get $next
global.get $TXHEAD global.get $TXHEAD
i32.atomic.load8_u i32.atomic.load8_u
i32.eq i32.eq