shader: decode the remaining GFX10 SMEM operations in disasm_rdna2 #1101
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!1101
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1101/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?
@tedin7 on GitHub · 2026-11-24 01:01 UTC · original
tedin7:x2w-disasm-smem-ops→main· +74 −2 · 4 files · 4 commits · merged 2026-11-24 02:24 UTCChange
Decode the remaining GFX10 SMEM operations in
tools/disasm_rdna2.py:s_buffer_store_dword{,x2,x4},s_gl1_inv,s_dcache_inv,s_dcache_wb,s_memtime,s_memrealtime,s_atc_probeands_atc_probe_buffer. Before this they printed ass_smem_NNwith a four-register data operand. Cache-control ops print no operands, the timer ops print only the destination pair, and the probe ops print the 7-bit probe immediate. Follow-up to #938. Only the SMEM tables are touched.AI-assisted.
Verification
python3 -B tests/rdna2_tools_check.pywithLLVM_MC=llvm-mc-19 LLVM_OBJCOPY=llvm-objcopy-19(noLLVM_LIB): 101 tests, OK (skipped=9, the LLVM-library round trips).origin/maintools failstest_golden_vectors; with this change it passes.llvm-mc-19 -mcpu=gfx1013 -show-encoding(llvm-mc-15 was not available on my machine). The same strings are added to the llvm-mc assembly list in the existing source-built test, which runs where LLVM 15 is installed.test_llvm_comparisonandtest_source_built_records_after_s_endpgmalso fail on unmodifiedorigin/main(version spelling differences); none of the mismatches involve the new SMEM forms.Evidence and follow-up
s_store_dword*,s_dcache_discard*.Checklist
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 01:02 UTC · original · edited 2026-11-24 01:08 UTC
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
2c04bf8ℹ️ 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.
@ -402,2 +402,4 @@0x0b: "s_buffer_load_dwordx8",0x0c: "s_buffer_load_dwordx16",0x18: "s_buffer_store_dword",0x19: "s_buffer_store_dwordx2",@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 01:08 UTC · original
The added stores, cache-control operations, timers and probes extend the user-visible decoding capabilities, but neither the README nor
docs/experiments.mdis updated. The rootAGENTS.mdrequires a README or experiment-documentation update when a public capability changes. Record the disassembly-only scope, reproduction command and remaining unsupported forms there rather than leaving that information only in the commit message.AGENTS.md reference: AGENTS.md:L172-L173
Useful? React with 👍 / 👎.
@ -2152,0 +2170,4 @@if op in SMEM_PROBE_OPS:sdata_str = str(sdata)else:sdata_str = decode_s_reg(sdata) if data_width == 1 else f"s[{sdata}:{sdata + data_width - 1}]"@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 01:08 UTC · original
For valid gfx1013 timer encodings with a special destination, this formats the destination as a nonexistent SGPR range. For example,
401f90f400000000, assembled by LLVM 20 ass_memtime null, now printss_memtime s[125:126]; a VCC destination similarly printss[106:107]. LLVM rejects those emitted operands, so the newly supported timer instructions misidentify their destination and cannot round-trip through assembly. Use the existingdecode_s_reg64helper for two-register operands and cover special destinations in the vectors.Useful? React with 👍 / 👎.
@tedin7 on GitHub · 2026-11-24 01:13 UTC · original
AI-assisted follow-up (
305de800) for the review findings.python3 -B tests/rdna2_tools_check.py, and the decoding-only limits (no lowering, scanner support or hardware evidence).s_memtime/s_memrealtimenow keep the named 64-bit destination spelling (null,vcc,ttmp[n:n+1]), matching llvm-mc. Record401f90f400000000decodes ass_memtime nullinstead ofs[125:126].@tedin7 on GitHub · 2026-11-24 01:33 UTC · original
AI-assisted update: the scanner now recognizes the decoded scalar-memory mnemonics (
is_opcode_recognized, recognition only, no lowering). New testtest_decoded_scalar_memory_forms_are_recognizedfails against main's scanner (10 mnemonics missing) and passes here;python3 -B tests/rdna2_tools_check.pygives 102 tests OK (9 skipped).docs/experiments.mdnote updated.@tedin7 on GitHub · 2026-11-24 02:00 UTC · original
AI-assisted. Merged origin/main to resolve conflicts with the SOPK and SOPP decoder change: the scanner recognition sets, the test import and the recognition test are kept side by side. python3 -B tests/rdna2_tools_check.py passes locally.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-24 01:08 UTC · original · reviewed
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
2c04bf850bℹ️ 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".