shader: decode the remaining GFX10 SMEM operations in disasm_rdna2 #1094
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1101"
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 tedin7 on 2026-11-24T01:01:54Z.
Change
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
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T01:08:54Z.
Review: COMMENTED
💡 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".
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T01:02:09Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T01:13:24Z.
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].Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T01:33:49Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:00:07Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T01:08:54Z.
Code review location:
tools/disasm_rdna2.py; line 376The 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 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T01:08:54Z.
Code review location:
tools/disasm_rdna2.py; line 2011For 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 👍 / 👎.
cpu_native_tls_valuefails with MSVC 19.42: expected 8 KiB pattern missing fromcpu_tls_value.dllTLS template #1458devpreset (Debug) with MSVC 19.42: five CRT-free TLS fixture targets fail to link (unresolved__dyn_tls_on_demand_init) #1087