tooling: decode 32-bit src0 for SOP1 s_bitset0_b64 and s_bitset1_b64 in disasm_rdna2 #1578

Merged
tedin7 merged 1 commit from upstream-pr/1585 into main 2026-11-24 15:15:16 +00:00
tedin7 commented 2026-11-24 14:36:51 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T14:36:51Z.


Summary

  • Fix tools/disasm_rdna2.py SOP1 src0_64 detection so s_bitset0_b64 and s_bitset1_b64 decode their ssrc0 bit-index operand as a 32-bit scalar (s4, vcc_lo) instead of a 64-bit scalar pair (s[4:5], vcc), matching the RDNA2 ISA and downstream tools/pixel_aot.py lowering.
  • Add unit tests in tests/rdna2_tools_check.py (TestDisasmSop1BitsetWidths) covering s_bitset0_b64 (s4, vcc_lo) and s_bitset1_b64 (s4), positive controls (s_not_b64, s_bitreplicate_b64_b32), byte-exact llvm-mc encoding round-trips, and negative controls rejected by llvm-mc (s[4:5], vcc).

Verification

  • python3 -B tests/rdna2_tools_check.py (143 tests ran, OK, skipped=18)
  • python3 -B -m unittest tests.rdna2_tools_check.TestDisasmSop1BitsetWidths -v (1 test ran, OK)
  • python3 -B tests/docs_links_check.py (OK)
  • python3 -B tests/bidi_controls_check.py (OK)
  • git diff --check origin/main..HEAD (OK)

AI-assisted; commands listed were executed locally.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6584238548 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1585). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T14:36:51Z. --- ### Summary - Fix `tools/disasm_rdna2.py` SOP1 `src0_64` detection so `s_bitset0_b64` and `s_bitset1_b64` decode their `ssrc0` bit-index operand as a 32-bit scalar (`s4`, `vcc_lo`) instead of a 64-bit scalar pair (`s[4:5]`, `vcc`), matching the RDNA2 ISA and downstream `tools/pixel_aot.py` lowering. - Add unit tests in `tests/rdna2_tools_check.py` (`TestDisasmSop1BitsetWidths`) covering `s_bitset0_b64` (`s4`, `vcc_lo`) and `s_bitset1_b64` (`s4`), positive controls (`s_not_b64`, `s_bitreplicate_b64_b32`), byte-exact `llvm-mc` encoding round-trips, and negative controls rejected by `llvm-mc` (`s[4:5]`, `vcc`). ### Verification - `python3 -B tests/rdna2_tools_check.py` (143 tests ran, OK, skipped=18) - `python3 -B -m unittest tests.rdna2_tools_check.TestDisasmSop1BitsetWidths -v` (1 test ran, OK) - `python3 -B tests/docs_links_check.py` (OK) - `python3 -B tests/bidi_controls_check.py` (OK) - `git diff --check origin/main..HEAD` (OK) AI-assisted; commands listed were executed locally.
chatgpt-codex-connector[bot commented 2026-11-24 15:02:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-24T14:51:24Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-24T14:53:57.702727Z cd4a19e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7135061044 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1585#issuecomment-7135061044). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T14:51:24Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"cd4a19e28f64a4bbe79936a3e80c8571f88caf49","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-24T14:53:57.702727Z">2026-11-24T14:53:57.702727Z</relative-time> | `cd4a19e` | Draft marked ready | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
upstream-sync changed title from [PR #1585] tooling: fix VOP1 f64 dst and SOP1 bitset src0 widths in disasm_rdna2 to [PR #1585] tooling: decode 32-bit src0 for SOP1 s_bitset0_b64 and s_bitset1_b64 in disasm_rdna2 2026-11-24 16:03:09 +00:00
upstream-sync closed this pull request 2026-11-24 16:03:09 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!1578
No description provided.