recompiler: sync GTE read-helper classification with runtime accessor semantics - #272
Merged
Merged
Conversation
… semantics The emitter's mfc2/cfc2 raw-vs-helper classification (gte_register_classification.h) was out of sync with the runtime's gte_read_data/gte_read_ctrl special cases: compiled code read OTZ(7) and SZ0-3(16-19) unmasked and VZ/IR-class regs (1,3,5,8-11) without sign extension, and cfc2 missed ctrl regs 4/12/20 — while the interpreter always goes through the accessors. Nine data regs + three ctrl regs of backend semantic divergence, locked in by a stale static_assert mask. data_read_needs_helper now covers every gte_read_data special case (masks 0xB08F8FAA data / 0xEC101010 ctrl); regenerate titles to pick it up.
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
The emitter's mfc2/cfc2 raw-vs-helper classification
(gte_register_classification.h) was out of sync with the runtime's
gte_read_data/gte_read_ctrl special cases: compiled code read OTZ(7)
and SZ0-3(16-19) unmasked and the sign-extended class (1,3,5,8-11)
raw, and cfc2 missed ctrl regs 4/12/20 — while the interpreter always
goes through the accessors. Nine data regs + three ctrl regs of
backend semantic divergence, locked in by a stale static_assert mask.
Fix
data_read_needs_helper/ctrl_read_needs_helper now cover every accessor
special case (static_assert masks 0xB08F8FAA data / 0xEC101010 ctrl).
Titles must be regenerated to pick up the change.
Notes
Found while chasing the CMR2 corruption (which turned out to be the
separate stale-static-overlay bug); this desync is real regardless and
affects any title whose game code mfc2-reads the affected registers
into arithmetic. No measured regression on the CMR2 boot/attract path
after regeneration.