This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Partially fix disassembly of MIMG instructions
ClosedPublic

Authored by arsenm on Dec 12 2017, 9:19 AM.

Details

Summary

Stores failed to decode at all since they didn't have a
DecoderNamespace set. Loads worked, but did not change
the register width displayed to match the numbmer of
enabled channels.

The number of printed registers for vaddr is still wrong,
but I don't think that's encoded in the instruction so
there's not much we can do about that.

Image atomics are still broken. MIMG is the same
encoding for SI/VI, but the image atomic classes
are split up into encoding specific versions unlike
every other MIMG instruction. They have isAsmParserOnly
set on them for some reason. dmask is also special for
these, so we probably should not have it as an explicit
operand as it is now.

Diff Detail

Event Timeline

arsenm created this revision.Dec 12 2017, 9:19 AM
dp accepted this revision.Dec 13 2017, 8:44 AM

Looks good.

There are a couple of differences with sp3 which we should probably address in the future:

  • sp3 always prints vaddr as having 4 components. This is not correct either, but should we mimic sp3 for compatibility?
  • sp3 accounts for tfe when computing dst size. Our implementation accepts tfe but actually ignores it.

I'm gonna take a look at mimg issues next week.

This revision is now accepted and ready to land.Dec 13 2017, 8:44 AM
arsenm closed this revision.Dec 13 2017, 1:08 PM

r320614