disasm_rdna2: decode v_madmk_f32 and v_madak_f32 with their literal #615
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!615
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/615/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?
@JB2WIN on GitHub · 2026-11-22 15:59 UTC · original
JB2WIN:fix/disasm-madak-madmk→main· +8 −3 · 2 files · 1 commits · merged 2026-11-22 16:34 UTCChange
tools/disasm_rdna2.pydid not know VOP2 opcodes 0x20 (v_madmk_f32) and 0x21 (v_madak_f32). It printedv_vop2_20/21, and because it did not consume their mandatory 32-bit literal, the next word was decoded as a separate instruction. That meant the scanner could not recognise the forms that #595 madepixel_aotlower. The two opcodes now join the literal set withv_fmamk_f32/v_fmaak_f32(0x2c/0x2d), using the same operand order: K second for madmk, last for madak.Follow-up to #595 (noted there). AI-assisted (Claude Code).
Verification
llvm-mc -mcpu=gfx1013 -show-encoding. The disassembler tests add the two encodings as golden vectors:v_madmk_f32 v5, v1, 0x11213141, v3encodes as[0x01,0x07,0x0a,0x40,0x41,0x31,0x21,0x11]v_madak_f32 v5, v1, v2, 0x11213141encodes as[0x01,0x05,0x0a,0x42,0x41,0x31,0x21,0x11]python -B tests/rdna2_tools_check.py: OK (skipped=1). Without the change totools/disasm_rdna2.pythe new vectors fail:AssertionError: 2 != 1 : Failed for 01070a4041312111, because the literal decoded as a second instruction.python -B tests/pixel_aot_check.py(controls): passed.🤖 Generated with Claude Code