Repository navigation
fix(libSceAgc): encode sceAgcCbBranch register arguments as the console does - #21376
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
Nothing blocks this change; the measurements and encoding changes are consistent with the code inspected.
What I ran
Read the prepared diff and all four changed files at head e52442471d8d0fa2ce6d8285ecfaaf32cb409478, plus sceAgcBranchPatchSetCompareAddress to confirm the existing 8-byte patch alignment check. No commands or tests were run in this review.
Results
| Check | Result | Note |
|---|---|---|
| Changed-file review | passed | All four changed files read |
| Tests | not run | Author reports Windows test and oracle runs |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The author-reported Windows 11 test, oracle, and convention-check results were not run or independently confirmed. No console behavior beyond the measurements described in the PR was verified. Read: core/libs/prx/libSceAgc/Cb/src/Branch.cpp, core/libs/prx/libSceAgc/tests/BranchPatch.cpp, docs/dev/debt/libSceAgc.md, and tools/library-oracle/known.tsv. No changed files were excluded.
To get this to a good state
Nothing is required.
…le does The console masks the mode to 2 bits and the compare function to 3 bits and clears the low bits of the compare address instead of rejecting them. The remaining oracle mismatches come from stack arguments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e524424 to
1e732ec
Compare
|
Validation-layer run of this PR on an NVIDIA GPU under Linux, since CI covers only lavapipe. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release,
The test is the one from the Tested section; this PR extends The focused test passes on Linux; no Vulkan instance is created, so there is nothing for the layer to validate. AI-assisted: yes (Claude Code) |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
prosper's
agcbuildconsole measurements (tools/library-oracle) showsceAgcCbBranchmasking its register arguments instead of rejecting them:_a0x2010x33333330_b0x201_c0x402AnyPS5 threw on the mode and compare-function bits and on the unaligned address.
sceAgcBranchPatchSetCompareAddressalready requires. Compare function 0 was not measured, so its address still passes through unchanged (testUnusedFields).known.tsvreason is now the stack-argument one, as forAcbCopyData.BRANCHpackets, so this changes only the encoding.agc_branch_patch_testsgainstestConsoleArguments, which writes the three measured cases plus a compare-function-3 address that is 4- but not 8-byte aligned, and drops the failure expectation for that address.libSceAgc.md.Tested
Windows 11, WinLibs GCC 15.2.0, Release.
ctest -R agc_branch_patch: 1 of 1 pass.library_oracle.py agcbuild: 144 known findings, 0 new.python tools/check_conventions.py --base origin/mainChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)