disasm_rdna2: decode 64-bit MUBUF and MTBUF buffer instructions #579
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!579
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/579/head"
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?
@Neoplayer on GitHub · 2026-11-22 13:57 UTC · original
Neoplayer:disasm/mubuf-mtbuf→main· +447 −3 · 3 files · 2 commits · merged 2026-11-22 15:25 UTCChange
Add decoding for 64-bit RDNA 2 (
gfx1013) MUBUF (prefix0xe0000000, 72 opcodes) and MTBUF (prefix0xe8000000, 16 opcodes) memory instructions intools/disasm_rdna2.py, and synchronizetools/scan_unsupported_shaders.py:tools/disasm_rdna2.py:MUBUF_OPScovering all 72gfx1013MUBUF forms (format/untyped/d16 loads and stores, 32-bit and 64-bit_x2atomics,buffer_gl0_inv,buffer_gl1_inv).MTBUF_OPScovering all 16gfx1013MTBUF forms (4-bit opcode split acrossw0[18:16]andw1[21]) andMTBUF_FORMATS(0=BUF_FMT_INVALID,1omitted as LLVM defaultBUF_FMT_8_UNORM,2..77namedBUF_FMT_*,78..127printed numerically)._format_vgpr_range(),_format_srsrc4()(s[n:n+3]andttmp[0:3]..ttmp[12:15]), and_format_buffer_operands_and_mods()handlingidxen/offen/off, 12-bit unsignedoffset,glc/slc/dlc,lds(omittingvdataon non-d16 loads),tfe(omitted on atomics), scalarsoffset, and truncated encodings (mubuf_truncated,mtbuf_truncated).tools/scan_unsupported_shaders.py:KNOWN_RDNA2_BASE_OPCODESand includetbuffer_inVMEM (Vector Memory / Buffer)inclassify_isa_category().tests/rdna2_tools_check.py:gfx1013golden vectors (test_golden_vectors), synthetic sweeps over all 72 MUBUF + 16 MTBUF opcodes + all MTBUF formats (test_mubuf_opcode_table_synthetic_forms,test_mtbuf_opcode_table_synthetic_forms), modifier/ttmp distinction checks (test_mubuf_mtbuf_distinguishes_modifiers), truncation & alignment checks, and exact-assembly LLVM 15 comparison (test_llvm_comparison).Verification
Commit under test:
25f3d13on macOS arm64 (verified against official upstreamllvm/llvm-projectllvmorg-15.0.7BUFInstructions.tddefinitions and local Homebrew LLVM 15.0.7-mcpu=gfx1013):LLVM_LIB=libLLVM-15.dylib LLVM_MC=llvm-mc LLVM_OBJCOPY=llvm-objcopy python3 -B tests/rdna2_tools_check.py:Ran 45 tests in 0.336s - OK(0 skips).pixel_aot.disassemble(..., libLLVM-15.dylib)across all 72 MUBUF ops, all 16 MTBUF ops, all 128 MTBUF format IDs (0..127), andsrsrcindices0..25+27..30(ttmp[0:3]..ttmp[12:15]):Checked 246 encodings against LLVM 15: mismatches=0.python3 -B tests/form_coverage_check.py:form coverage checks passed.python3 -B tests/shader_probe_check.py: 9 control checks passed.python3 -B tests/pso_readiness_check.py:PSO census, evidence states, and native hash control passed.python3 -B tests/docs_links_check.py:Self-test passed. Checked 10 Markdown files and 119 links.python3 -B tests/bidi_controls_check.py:Self-test passed. Checked 554 tracked source, script and build/CI files: no bidirectional controls.git diff --check: exit 0.MSVC, D3D12, and WARP builds (
cmake --preset dev) were not run on this macOS host and remain covered by Windows CI.Evidence and follow-up
All fixtures are source-built synthetic sequences assembled and checked against LLVM 15.0.7
-mcpu=gfx1013. DecodingFLAT/GLOBAL/SCRATCH(0xdc000000) is tracked as a separate follow-up PR.Checklist
AI-assisted.