tooling: decode the 13 missing GFX10 SOP2 carry, inverted-logic and pack opcodes #1071

Merged
tedin7 merged 1 commit from upstream-pr/1078 into main 2026-11-24 00:50:29 +00:00
tedin7 commented 2026-11-24 00:27:29 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T00:27:29Z.


Change

Adds the 13 missing GFX10 SOP2 opcodes to SOP2_OPS in tools/disasm_rdna2.py: s_addc_u32, s_subb_u32, s_orn2_b32/b64, s_nand_b32/b64, s_nor_b32/b64, s_xnor_b32/b64, s_pack_ll_b32_b16, s_pack_lh_b32_b16, s_pack_hh_b32_b16. Only the SOP2 table is touched. Refs #938.

Verification

  • python3 -B tests/rdna2_tools_check.py -> Ran 98 tests, OK (skipped=8).
  • New test test_sop2_carry_logic_pack_forms decodes golden bytes (from llvm-mc gfx1013) to the exact LLVM text. When LLVM_LIB is set it also re-assembles the text and compares LLVM's disassembly. Run with llvm-mc-19 / libLLVM 19: OK.
  • Negative control: on origin/main the new test fails (s_sop2_04 s0, s1, s2 instead of s_addc_u32 s0, s1, s2); with this change it passes.
  • Spelling: these mnemonics are unchanged between LLVM 15 and 19. The test is a fixed golden list compared against whichever LLVM CI supplies; LLVM 15 itself is not installed locally, so the CI job is the check for it.

Evidence and follow-up

Decoder tooling only. No claim about running any title. AI-assisted.

Checklist

  • One behavior, no unrelated changes
  • Synthetic fixtures only, no game files
  • Test fails before and passes after
<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6571771123 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1078). Originally posted by [tedin7](https://github.com/tedin7) on 2026-11-24T00:27:29Z. --- ## Change Adds the 13 missing GFX10 SOP2 opcodes to `SOP2_OPS` in `tools/disasm_rdna2.py`: `s_addc_u32`, `s_subb_u32`, `s_orn2_b32/b64`, `s_nand_b32/b64`, `s_nor_b32/b64`, `s_xnor_b32/b64`, `s_pack_ll_b32_b16`, `s_pack_lh_b32_b16`, `s_pack_hh_b32_b16`. Only the SOP2 table is touched. Refs #938. ## Verification - `python3 -B tests/rdna2_tools_check.py` -> Ran 98 tests, OK (skipped=8). - New test `test_sop2_carry_logic_pack_forms` decodes golden bytes (from llvm-mc gfx1013) to the exact LLVM text. When `LLVM_LIB` is set it also re-assembles the text and compares LLVM's disassembly. Run with llvm-mc-19 / libLLVM 19: OK. - Negative control: on origin/main the new test fails (`s_sop2_04 s0, s1, s2` instead of `s_addc_u32 s0, s1, s2`); with this change it passes. - Spelling: these mnemonics are unchanged between LLVM 15 and 19. The test is a fixed golden list compared against whichever LLVM CI supplies; LLVM 15 itself is not installed locally, so the CI job is the check for it. ## Evidence and follow-up Decoder tooling only. No claim about running any title. AI-assisted. ## Checklist - [x] One behavior, no unrelated changes - [x] Synthetic fixtures only, no game files - [x] Test fails before and passes after
upstream-sync closed this pull request 2026-11-24 06:46:11 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:49:56 +00:00 (Migrated from github.com)

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


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-24T00:30:12.190141Z e89e6fc PR opened
ℹ️ 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:7118091070 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/1078#issuecomment-7118091070). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-24T00:27:38Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"e89e6fc4cd75e48c878a9b46605aad3c2241192a","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-24T00:30:12.190141Z">2026-11-24T00:30:12.190141Z</relative-time> | `e89e6fc` | PR opened | <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>
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!1071
No description provided.