Skip to content

Cover the GFX10 decoder gaps and resolve legacy MAD/MAC semantics #64

Backlog

Description

@PrivacyOnion

What and why

The LLVM MC conformance test introduced in #52 pins nine missing opcode names and two unresolved legacy names. Add coverage for the missing instructions and determine which legacy forms the Xbox Series decoder should implement.

Decoder gaps

Encoding Opcode LLVM MC mnemonic
VOP3 0x200 to 0x202 v_interp_p1_f32_e64, v_interp_p2_f32_e64, v_interp_mov_f32_e64
MIMG 0x061 image_gather4h
MIMG 0x0e8 to 0x0eb image_sample_cd_g16, image_sample_cd_cl_g16, image_sample_c_cd_g16, image_sample_c_cd_cl_g16
VOP3P 0x018 v_dot8_i32_i4

Alias the three VOP3 interpolation opcodes to VINTRP. Coordinate the MIMG entries with the ongoing _g16/a16 work. Add decoder and operand tests using public or synthetic encodings, and remove each corpus pin once its difference is resolved. The conformance test flags stale pins.

Legacy MAD/MAC

At VOP3 0x140 and VOP2 0x006, XTP uses v_mad_legacy_f32 and v_mac_legacy_f32 from Mesa 22.3.0's GFX10 (gfx1010) table. LLVM GFX10.3 uses v_fma_legacy_f32 and v_fmac_legacy_f32 at those positions. Console semantics remain open. LLVM MC GFX10.3 source

Establish the console behavior from a public source or a clean-room, synthetic test that distinguishes fused from unfused rounding. Use that result to decide whether the opcode names and lowering in emit/lower/valu.rs need a change. Record the evidence and add a regression test for the supported behavior.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions