Skip to content

arch-amdgpu: support ACC-selected DS data operands - #7

Open
Basemism wants to merge 1 commit into
stagingfrom
staging-basem/cdna3-ds-acc
Open

arch-amdgpu: support ACC-selected DS data operands#7
Basemism wants to merge 1 commit into
stagingfrom
staging-basem/cdna3-ds-acc

Conversation

@Basemism

@Basemism Basemism commented Sep 2, 2026

Copy link
Copy Markdown

Add support for the CDNA DS ACC encoding, which selects accumulator registers for DS instruction data operands.

Before, DS instructions emitted with ACC=1 are either rejected by the decoder or incorrectly read and write ordinary VGPRs instead of the wavefront’s AGPR allocation.

The DS encoding now decodes the former reserved bit as ACC.

When ACC=1:

  • DS source data operands are mapped through the AGPR window of the unified vector register file.
  • DS destination data operands are mapped through the same AGPR window.
  • The DS address operand remains an ordinary VGPR.
  • wf->accumOffset is added to data-register indices during both physical-register mapping and instruction execution.

Applying the offset in both paths ensures that dependency tracking and the instruction data path refer to the same physical registers.

The change covers 32-, 64-, 96-, and 128-bit DS reads and writes, including multi-data-register instructions.

Decode the CDNA DS ACC bit and map DS data operands, but not address operands,
through the AGPR window of the unified vector register file. Apply the same
accumulator offset during operand mapping and instruction execution for
32-, 64-, 96-, and 128-bit DS reads and writes.

Also accept all DS primary-encoding variants used by the ACC form and check
that mapped AGPR operands remain inside the wavefront's reserved vector
register allocation.
@Basemism Basemism self-assigned this Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant