fix(z80): pass memory parameters through callee spill slots - #69
Merged
Merged
Conversation
PR tests: 🟢 passCommit:
The external CZECH and full Zork I stories are not part of this PR gate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem and behavior
When PBQP assigns a callee parameter to memory, production call setup writes it to the allocator's provisional
$F0xxaddress. The callee reads its named_spill_<callee>_rNslot, so the value never arrives. Call setup now targets the same spill label that codegen emits for the callee. Indirect and external calls keep their existing ABI paths.Validation
$F072destination.gen3.pynoshiftseeds 0–149, Z80 source assertions pass 0/150 on fix(assert): initialize spilled Z80 parameters in direct-call bootstrap #68 and 4/150 with this fix; all 150 still assemble. This is a narrow improvement, not a claim that the generator is solved.go test -short -timeout 5m ./pkg/mir2/... ./pkg/pipeline/...passes.