tooling: consume DPP extension dword in disassembled VOPC #1976
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1983"
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 R0Y00/Xbox2Windows. Originally posted by RenzoWit35 on 2026-11-24T22:36:45Z.
Change
The VOPC branch of
decode_instructionintools/disasm_rdna2.pyhandled only src0 249 (SDWA) and 255 (literal). For src0 250 (DPP16), 233 (DPP8) and 234 (DPP8 FI) the 4-byte extension dword was not consumed: the compare was printed as a 4-bytev_cmp_*_e32 vcc_lo, s250, ...and the extension dword was then decoded as a separate bogus instruction, which desynchronised everything after it.These src0 values are now routed to the existing
_vop_extensionhelper (as VOP1/VOP2 do for forms they do not decode). The compare becomes one 8-byte record,v_cmp_gt_f32_dpp <unsupported DPP16>(orDPP8), and the next instruction is at the right offset. The operands are still not decoded; VOP1/VOP2 output is unchanged.Verification
Environment: Windows 11, Python 3.14.5.
python -B tools/disasm_rdna2.py --hex "fa02087c00010000000081bf"v_cmp_gt_f32_e32 vcc_lo, s250, v1(4 bytes),v_vop2_00(Unknown VOP2),s_endpgmv_cmp_gt_f32_dpp <unsupported DPP16>(8 bytes) at +0x0000,s_endpgmat +0x0008e902087c...andea02087c...(DPP8, DPP8 FI).tests/rdna2_tools_check.py(next to the VOPC SDWA case): record length 8, opcodevopc_dpp16/vopc_dpp8, assembly,s_endpgmoffset 8, and a 4-byte prefix isvopc_truncated.python -B tests/rdna2_tools_check.py: after the fixRan 152 tests ... OK (skipped=19).tools/disasm_rdna2.pyfails intest_vopc_opcode_table_synthetic_forms:['v_cmp_gt_f32_e32', 'v_vop2_00', 's_endpgm'] != ['vopc_dpp16', 's_endpgm'] : fa02087c00010000(FAILED (failures=1)).Not run: other test files; no LLVM comparison (LLVM not installed), so the unsupported-DPP text is a placeholder like the existing VOP1/VOP2 fallback.
Evidence and follow-up
Rebased on current
main. No open PR touchestools/disasm_rdna2.py. The sibling PRs for the CLI input errors and the SMEM signed offset change other parts of the same two files; the three merge in any order. Full VOPC DPP operand decoding (as_decode_vop2_dppdoes) is a possible follow-up.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T22:40:48Z.
Review: COMMENTED
Review of head
7205fcd8bb(comment only).Diff:
tools/disasm_rdna2.py(+2) routes VOPC with src0 in 233/234/250 through the existing_vop_extension, so the DPP8/DPP16 extension dword is consumed (length 8) like VOP1/VOP2.tests/rdna2_tools_check.py(+14) covers DPP16, DPP8 and DPP8 FI plus the truncated case. No CMake changes. Clean-room: no external code.Commands executed locally:
git merge-tree --write-tree --name-only origin/main HEAD: clean, no conflictspython3 tests/rdna2_tools_check.py: OK (152 tests, 19 skipped)python3 tests/docs_links_check.py: passpython3 tests/bidi_controls_check.py: passgit diff --check origin/main...HEAD: passx2w_pipe.py win2025 1983 --wait 900): Debug 18/18 passed, Release /O2 18/18 passedMutations (both reverted):
(233, 234, 250)->(233, 250): test fails (killed)(233, 234, 250)->(233, 234): test fails (killed)P1: 0. P2: 0.
AI-assisted; commands listed were executed locally.