feat: opérandes RDNA 2 au format LLVM #43

Merged
LooperSalty merged 1 commit from upstream-pr/43 into main 2026-11-21 16:21:48 +00:00
LooperSalty commented 2026-11-21 16:20:25 +00:00 (Migrated from github.com)

Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-21T16:20:25Z.


Résumé

  • emu/rdna2_operands.py décode les opérandes :
    • registres SGPR/VGPR, ttmp, vcc et exec ;
    • constantes en ligne, littéraux ;
    • immédiats hwreg(...) et s_waitcnt.
  • tools/rdna2_shapes.py apprend la forme de chaque opcode sur les tests publics de LLVM et mesure la conformité : 99,4 % des 8 204 lignes wave32 identiques à LLVM. SOP1, SOP2, SOPC, SOPK, VOP1 et VOPC sont à 100 %.
  • Écarts restants :
    • 18 en VOP2 : v_mac_legacy_f32 (nom gfx1010) est écrit v_fmac_legacy_f32, son nom RDNA 2 ;
    • 34 en SOPP : s_waitcnt_depctr et sendmsg sont écrits en hexadécimal brut.
  • La lecture des tests LLVM gère aussi les lignes « encoding » sans texte : 29 527 encodages lus, 0 longueur fausse, 1 384 mnémoniques.
  • --rdna2 <shader.bin> --liste affiche désormais les instructions complètes.

Plan de test

  • 3 nouveaux tests (registres, constantes, littéraux, hwreg, waitcnt, vcc implicite, sdst de v_readfirstlane)
  • pytest (hors test_native, qui demande le runtime compilé, absent du worktree)
  • CI

Refs #20

🤖 Generated with Claude Code

https://claude.ai/code/session_01LwHrL4XzbMR5No4bPXxPNW

<!-- greyfinch-sync:LooperSalty/AnyXboxX:issue:6531343255 --> Imported from [LooperSalty/AnyXboxX](https://github.com/LooperSalty/AnyXboxX/pull/43). Originally posted by [LooperSalty](https://github.com/LooperSalty) on 2026-11-21T16:20:25Z. --- ## Résumé - `emu/rdna2_operands.py` décode les opérandes : - registres SGPR/VGPR, ttmp, vcc et exec ; - constantes en ligne, littéraux ; - immédiats `hwreg(...)` et `s_waitcnt`. - `tools/rdna2_shapes.py` apprend la forme de chaque opcode sur les tests publics de LLVM et mesure la conformité : **99,4 % des 8 204 lignes wave32 identiques à LLVM**. SOP1, SOP2, SOPC, SOPK, VOP1 et VOPC sont à 100 %. - Écarts restants : - 18 en VOP2 : `v_mac_legacy_f32` (nom gfx1010) est écrit `v_fmac_legacy_f32`, son nom RDNA 2 ; - 34 en SOPP : `s_waitcnt_depctr` et `sendmsg` sont écrits en hexadécimal brut. - La lecture des tests LLVM gère aussi les lignes « encoding » sans texte : 29 527 encodages lus, 0 longueur fausse, 1 384 mnémoniques. - `--rdna2 <shader.bin> --liste` affiche désormais les instructions complètes. ## Plan de test - [x] 3 nouveaux tests (registres, constantes, littéraux, hwreg, waitcnt, vcc implicite, sdst de v_readfirstlane) - [x] `pytest` (hors `test_native`, qui demande le runtime compilé, absent du worktree) - [ ] CI Refs #20 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LwHrL4XzbMR5No4bPXxPNW
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
LooperSalty/AnyXboxX!43
No description provided.