This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Correct encoding for global instructions
ClosedPublic

Authored by arsenm on Jul 19 2017, 4:01 PM.

Details

Summary

The soffset field needs to be be set to 0x7f to disable it,
not 0. 0 is interpreted as an SGPR offset.

This should be enough to get basic usage of the global instructions
working. Technically it is possible to use an SGPR_32 offset,
but I'm not sure if it's correct with 64-bit pointers, but
that is not handled now. This should also be cleaned up
to be more similar to how different MUBUF modes are handled,
and to have InstrMappings between the different types.

Diff Detail

Event Timeline

arsenm created this revision.Jul 19 2017, 4:01 PM
SamWot accepted this revision.Jul 19 2017, 7:50 PM

LGTM

This revision is now accepted and ready to land.Jul 19 2017, 7:50 PM
arsenm closed this revision.Jul 19 2017, 10:18 PM

r308583