tooling: decode v_cvt_off_f32_i4, v_sat_pk_u8_i16 and the two swaps in disasm_rdna2 #1587
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1594"
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 vladbondarenko97 on 2026-11-24T14:40:13Z.
Change
VOP1 opcodes 0x0e, 0x62, 0x65 and 0x68 printed as
v_vop1_NN(also through VOP3). They now decode as llvm-mc prints them for gfx1013:v_cvt_off_f32_i4andv_sat_pk_u8_i16in e32, e64, SDWA and DPP;v_swap_b32andv_swaprel_b32as 32-bit VOP1 only, with the VOP3A, SDWA and DPP spellings kept as eight-byte refusals. The scanner recognizesv_swaprel_b32. Decoding only. Refs #938.Verification
Commit
e7e1e928on maine09b3302, macOS, Python 3.14.python -B tests/rdna2_tools_check.py: Ran 143, OK (skipped=18). The new tests fail withtools/from main (failures=22).Not run: the Windows ctest, and LLVM 15.
Evidence and follow-up
A non-VGPR source of a swap prints like any VOP1 source; llvm-mc prints it with an "invalid register" note. No hardware measurement. Fixtures are hand-assembled words and llvm-mc output, no game data.
Checklist
AI use: Claude Code. Claude Sonnet 5.5 wrote the change, the tests and the llvm-mc sweep; Claude Opus 5.5 reviewed the diff and reran the suite. I reviewed it.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T15:27:26Z.
Review: COMMENTED
Reviewed at commit
e7e1e928f94cf583bb377ef5dbced90ec21a6393.Findings
tools/disasm_rdna2.py: addsv_cvt_off_f32_i4_e32(0x0e),v_sat_pk_u8_i16_e32(0x62),v_swap_b32(0x65), andv_swaprel_b32(0x68) toVOP1_OPS, and refuses VOP3A encodings ofv_swap_b32andv_swaprel_b32while preserving the 8-byte instruction boundary.tools/scan_unsupported_shaders.py: addsv_swaprel_b32toKNOWN_RDNA2_BASE_OPCODES.tests/rdna2_tools_check.py: tests_e32,_e64,_sdwa,_dpp, 8-byte VOP3A/SDWA/DPP16 refusals for the two swaps, neighbouring undefined opcodes (0x66,0x67), and binary scanner recognition. Cross-checked againstllvm-mc-19 -arch=amdgcn -mcpu=gfx1013for the e32, SDWA, DPP16, swap, and e64 opcodes/modifiers.Verification
python3 -B tests/docs_links_check.py-> passed (16 Markdown files, 345 links).python3 -B tests/bidi_controls_check.py-> passed (1255 tracked files).python3 -B tests/rdna2_tools_check.py-> 143 tests ran, OK (skipped=18).--preset dev):ctest --preset dev -R '^(pixel_aot_.*_warp|pso_readiness_check|rdna2_tools_check)$'(68 direct downstream tests) -> 68/68 passed (76.23s)./O2(--preset release): same 68-test suite -> 68/68 passed (71.84s).No blocking issues found.
AI-assisted; commands listed were executed locally.