[PATCH] D83760: [AMDGPU][MC] Corrected MTBUF parsing and decoding

Dmitry Preobrazhensky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 14 04:23:14 PDT 2020


dp created this revision.
dp added reviewers: rampitec, arsenm, vpykhtin, artem.tamazov.
Herald added subscribers: llvm-commits, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.

MTBUF implementation has many issues and this change addresses most of these:

- refactored duplicated code;
- hardcoded constants moved out of high-level code;
- fixed a decoding error when nfmt or dfmt are zero (bug 36932 <https://bugs.llvm.org/show_bug.cgi?id=36932>);
- corrected parsing of operand separators (bug 46403 <https://bugs.llvm.org/show_bug.cgi?id=46403>);
- corrected handling of missing operands (bug 46404 <https://bugs.llvm.org/show_bug.cgi?id=46404>);
- corrected handling of out-of-range modifiers (bug 46421 <https://bugs.llvm.org/show_bug.cgi?id=46421>);
- corrected default value (bug 46467 <https://bugs.llvm.org/show_bug.cgi?id=46467>).

MTBUF implementation was actually rewritten from scratch so I'm not sure if these changes should be submitted separately from each other.

There is one remaining issue: current MTBUF syntax is not compatible with SP3 <https://bugs.llvm.org/show_bug.cgi?id=37738>. SP3 syntax support will be added by a separate change.


https://reviews.llvm.org/D83760

Files:
  llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
  llvm/lib/Target/AMDGPU/BUFInstructions.td
  llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.cpp
  llvm/lib/Target/AMDGPU/SIDefines.h
  llvm/lib/Target/AMDGPU/SIInstrInfo.td
  llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
  llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
  llvm/test/MC/AMDGPU/mtbuf-gfx10.s
  llvm/test/MC/AMDGPU/mtbuf.s
  llvm/test/MC/Disassembler/AMDGPU/mtbuf_gfx10.txt
  llvm/test/MC/Disassembler/AMDGPU/mtbuf_vi.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83760.277751.patch
Type: text/x-patch
Size: 24048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200714/dd418951/attachment.bin>


More information about the llvm-commits mailing list