diff options
author | Ivan Kosarev <ivan.kosarev@amd.com> | 2023-09-22 10:49:56 +0100 |
---|---|---|
committer | Ivan Kosarev <ivan.kosarev@amd.com> | 2023-09-23 22:07:41 +0100 |
commit | fab28e0e140eb55da25b7923a548ab357a9da544 (patch) | |
tree | d454fdf7b4fe7235f128380f15c35a0e659fe2a2 /llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h | |
parent | f435f55d58542ecde0e66460555ccbcbca355cc5 (diff) | |
download | llvm-fab28e0e140eb55da25b7923a548ab357a9da544.zip llvm-fab28e0e140eb55da25b7923a548ab357a9da544.tar.gz llvm-fab28e0e140eb55da25b7923a548ab357a9da544.tar.bz2 |
Reapply "[AMDGPU] Introduce real and keep fake True16 instructions."
Reverts 6cb3866b1ce9d835402e414049478cea82427cf1.
Analysis of failures on buildbots with expensive checks enabled showed
that the problem was triggered by changes in another commit,
469b3bfad20550968ac428738eb1f8bb8ce3e96d, and was caused by the bug
addressed in #67245.
Diffstat (limited to 'llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h')
-rw-r--r-- | llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h index 4e14219..70b99fa 100644 --- a/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h +++ b/llvm/lib/Target/AMDGPU/Disassembler/AMDGPUDisassembler.h @@ -144,6 +144,17 @@ public: return MCDisassembler::Fail; } + template <typename InsnType> + DecodeStatus tryDecodeInst(const uint8_t *Table1, const uint8_t *Table2, + MCInst &MI, InsnType Inst, uint64_t Address, + raw_ostream &Comments) const { + for (const uint8_t *T : {Table1, Table2}) { + if (DecodeStatus Res = tryDecodeInst(T, MI, Inst, Address, Comments)) + return Res; + } + return MCDisassembler::Fail; + } + std::optional<DecodeStatus> onSymbolStart(SymbolInfoTy &Symbol, uint64_t &Size, ArrayRef<uint8_t> Bytes, uint64_t Address, raw_ostream &CStream) const override; |