shader: align VOP2 opcode table with GFX10/RDNA 2 in disasm_rdna2 #248
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/251"
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 Vonsek on 2026-11-21T19:18:40Z.
Change
Align
VOP2_OPSintools/disasm_rdna2.pywith the GFX10 / RDNA 2 (gfx1013) ISA opcode table, following up on #245.Previously,
VOP2_OPSmapped pre-GFX10 opcode numbers (for example0x01tov_add_f32_e32instead ofv_cndmask_b32_e32,0x03tov_subrev_f32_e32instead ofv_add_f32_e32,0x10tov_and_b32_e32instead ofv_max_f32_e32, and0x1btov_fmac_f32_e32instead ofv_and_b32_e32). It now maps all 22 VOP2 opcodes to their GFX10/RDNA 2 numbers, formatsv_cndmask_b32_e32with its implicitvcc_looperand, and removes the non-VOP2v_cvt_pkrtz_f16_f32_e32entry at0x2f.tests/rdna2_tools_check.py:v_cndmask_b32_e32,v_add_f32_e32,v_mul_f32_e32,v_and_b32_e32,v_add_nc_u32_e32,v_fmac_f32_e32);test_llvm_comparisonso the UbuntuAssemble and translate gfx1013 fixturesCI job verifies every opcode and operand against LLVM 15 (llvm-mc -mcpu=gfx1013/libLLVM).Verification
Tested on Windows 11 x64, Python 3.12.10, at commit
5c48879:tools/disasm_rdna2.py,rdna2_tools_checkfails on the GFX10 VOP2 vectors:tools/disasm_rdna2.py: (test_llvm_comparisonis skipped locally withoutLLVM_LIBand runs in the UbuntuAssemble and translate gfx1013 fixturesCI job.)Evidence and follow-up
All test vectors are original synthetic encodings and
llvm-mcsource instructions.Other opcode tables in
tools/disasm_rdna2.py(VOP1_OPS,SOP1_OPS,SOP2_OPS,SOPK_OPS) are left for separate focused follow-ups verified against LLVM 15.Checklist
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:28:17Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
79bb63d25cℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:25:24Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
79bb63dℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by Vonsek on 2026-11-21T19:31:32Z.
Restored
0x2f: v_cvt_pkrtz_f16_f32_e32inVOP2_OPSand addedv_cvt_pkrtz_f16_f32_e32 v3, v1, v2to the LLVM comparison fixture intests/rdna2_tools_check.py.Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-21T19:28:17Z.
Code review location:
tools/disasm_rdna2.py; line 192For gfx1013 bytes
0105065e, LLVM 20 and the parent commit both decodev_cvt_pkrtz_f16_f32_e32 v3, v1, v2, but the updated disassembler instead emitsv_vop2_2f v3, v1, v2. Opcode0x2fremains a valid GFX10 VOP2 instruction, also classified as such indocs/coverage/gfx1013.tsv:1281, so removing its mapping regresses disassembly of half-float packing instructions used before color exports. Retain the mapping and include this instruction in the LLVM comparison fixture.Useful? React with 👍 / 👎.