aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
diff options
context:
space:
mode:
authorRonak Chauhan <ronaknilesh.chauhan@amd.com>2020-06-12 14:00:33 -0400
committerScott Linder <Scott.Linder@amd.com>2020-06-12 15:51:37 -0400
commit480a16d5c8092f4eac181fb669c7ac05dc446a00 (patch)
treef1c78cc8141d1319bfe465567a7188d0d86aa2ba /llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
parent339177d1da0c6f0cf181ba987836148acb526926 (diff)
downloadllvm-480a16d5c8092f4eac181fb669c7ac05dc446a00.zip
llvm-480a16d5c8092f4eac181fb669c7ac05dc446a00.tar.gz
llvm-480a16d5c8092f4eac181fb669c7ac05dc446a00.tar.bz2
[MC] Changes to help improve target specific symbol disassembly
Summary: This commit slightly modifies the MCDisassembler, and llvm-objdump to allow targets to also decode entire symbols. WebAssembly uses the onSymbolStart hook it to decode preludes. WebAssembly partially disassembles the symbol in its target specific way; and then falls back to the normal flow of llvm-objdump. AMDGPU needs it to decode kernel descriptors entirely, and move to the next symbol. This commit is to split the above task into 2. - Changes to llvm-objdump and MC-layer without breaking WebAssembly code [ this commit ] - AMDGPU's implementation of onSymbolStart that decodes kernel descriptors. [ https://reviews.llvm.org/D80713 ] Reviewers: scott.linder, t-tye, sunfish, arsenm, jhenderson, MaskRay, aardappel Reviewed By: scott.linder, jhenderson, aardappel Subscribers: bcain, dschuff, wdng, tpr, sbc100, jgravelle-google, hiraditya, aheejin, MaskRay, rupprecht, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D80512
Diffstat (limited to 'llvm/lib/MC/MCDisassembler/MCDisassembler.cpp')
-rw-r--r--llvm/lib/MC/MCDisassembler/MCDisassembler.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp b/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
index 40ffd1f..cf3db23 100644
--- a/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
+++ b/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
@@ -16,12 +16,11 @@ using namespace llvm;
MCDisassembler::~MCDisassembler() = default;
-MCDisassembler::DecodeStatus
+Optional<MCDisassembler::DecodeStatus>
MCDisassembler::onSymbolStart(StringRef Name, uint64_t &Size,
ArrayRef<uint8_t> Bytes, uint64_t Address,
raw_ostream &CStream) const {
- Size = 0;
- return MCDisassembler::Success;
+ return None;
}
bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value,