disasm_rdna2: decode v_madmk_f32 and v_madak_f32 with their literal #609
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/615"
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 JB2WIN on 2026-11-22T15:59:02Z.
Change
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