Skip to content

Preserve spawn hooks when indirect codegen elides a redundant cast - #158

Merged
mstan merged 1 commit into
mainfrom
fix/indirect-codegen-spawn-hooks-20261103
Nov 3, 2026
Merged

mstan merged 1 commit into
mainfrom
fix/indirect-codegen-spawn-hooks-20261103

Conversation

@mstan

@mstan mstan commented Nov 3, 2026

Copy link
Copy Markdown
Owner

The supported regen pipeline stopped at two of four WS-SPAWN-PASS hooks with RetroPortingToolKit/snesrecomp#243: the emitter no longer wraps an already-uint16 pointer read in a redundant cast. Accept both balanced spellings while retaining the exact function, instruction block, DP+$18 pointer, value binding and strict four-hook check.

Validation: actual generated baseline and candidate spawn blocks each produce all four hooks. Changing the pointer to DP+$17 leaves only the two unrelated hooks, preserving the negative control. Full supported regen and Release build pass on engine ed0334b (the combined reviewed PR batch); override --check is idempotent. Built MMX movement, current-build save/load and malformed-state survival pass. Brief matched runtime is 4.20 ms/frame baseline and 4.23 ms/frame candidate, neutral within shared-host variation. No generated game code is included.

Tracking: beads-8wg.1.156. Owner merge handoff is pending alongside RetroPortingToolKit/snesrecomp#243, RetroPortingToolKit/snesrecomp#244, RetroPortingToolKit/snesrecomp#245, RetroPortingToolKit/snesrecomp#246 and RetroPortingToolKit/snesrecomp#247.

@mstan
mstan merged commit 79565bc into main Nov 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant