Recompiler: far jumps ignore incoming branches into the address calculation #863
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#863
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@nova-aryan on GitHub · 2026-11-24 06:59 UTC · original
The far-jump recognizer assumes that a four-instruction GETPC/add/addc/SETPC sequence always starts at GETPC. A direct branch into its low add, high add or SETPC can bypass that initialization, so the resulting SETPC target depends on the incoming SGPR state. Current main nevertheless annotates it with a fixed target.
I reproduced this with synthetic decoder tests on
beaa245. An ordinary uninterrupted add/subtract sequence passes, while a conditional branch into the sequence and a resolved far jump into a later sequence both fail the new assertions.Plan: collect direct and prospective far targets before publishing annotations, and leave a sequence indirect if any target enters after GETPC. Add regression coverage for both add/subtract and far-to-far edges.
Tested so far with a standalone harness importing the repository's unchanged decoder/spec modules under Rust 1.100.0 on WSL Linux. This is not a Windows crate build or GPU/retail run. Windows MSVC tools and a retail smoke-test title are unavailable in this checkout.
AI use: Codex, GPT-6.1-sol, reproduced the issue and drafted the proposed tests and fix.