docs(shader): record the measured s_call_b64 and null s_swappc_b64 behaviour #2381
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2381"
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?
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-09T16:56:56Z.
What
Two TechnicalDebt entries said what the recompiler assumes without a hardware measurement. Measured on RDNA2 (gfx1036, Ryzen 7950X3D iGPU) with
tools/hw-oracle(Linux, CachyOS kernel 7.2.9, hsa-rocr 7.2.4, clang 23.1.1 as the assembler, tools atmaind70b8998, mode IEEE 0, f32 denormals flushed, f16/f64 kept, DX10_CLAMP 1, RNE), in wave32 and wave64, and recorded in the entries:s_call_b64(SIMM16 = 3): the link pair receivesPC + 4and the branch goes toPC + 4 + signext(SIMM16) * 4;s_setpc_b64of the link returns to the instruction after the call (a counter shows the callee, +1, and the return path, +2, each ran once). The entry's "native RDNA2 ... execution" becomes measured; execution on the PS5 (gfx1013) and title compatibility stay unverified.s_swappc_b64with SDST 125 (the null register): the hardware branches to the source pair (the instruction at the skipped address is not executed) and leaves a marker SGPR pair untouched; with an SGPR destination the link isPC + 4. So the existing decode ass_setpc_b64matches the hardware.The
s_memtimemeasurements from the same run are posted on #1632, which rewrites that entry.No code changes. Bodies, rows, outputs and the script: https://github.com/SleglJan/AnyPS5/tree/audit/oracle-2026-10-08/oracle-audit/scalar-misc.
Tested
tools/check_conventions.py --base upstream/mainpasses; the entries are documentation only.Overlap: #2302 (open) edits the same
s_swappc_b64entry, and #2161 and #2178 add entries next to thes_call_b64one; none of them shares code with this PR or is built on by it, so whichever merges second needs a one-line rebase.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-09T17:31:27Z.
The overlap is TechnicalDebt only: #2302 rewrites the
s_swappc_b64entry this PR extends by one sentence, and #2161 and #2178 add entries next to thes_call_b64one. No shared code and no dependency; whichever merges second needs a one-line rebase, noted in the description.AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T06:17:30Z.
Reproduced both measurements on gfx1035 with
tools/hw-oracle, wave32 and wave64:s_call_b64SIMM16 = 3 gives link = PC + 4, the callee and the return path each run once, and the skipped instruction doesn't run;s_swappc_b64with SDST 125 branches to the source pair, skips the instruction in between and leaves M0 and a marker SGPR pair untouched; with an SGPR destination the link is PC + 4. Rebased onto main (adjacency conflict with the #2178 entry, both lines kept); merging.