[MC] Changes to help improve target specific symbol disassembly
authorRonak Chauhan <ronaknilesh.chauhan@amd.com>
Fri, 12 Jun 2020 18:00:33 +0000 (14:00 -0400)
committerScott Linder <Scott.Linder@amd.com>
Fri, 12 Jun 2020 19:51:37 +0000 (15:51 -0400)
commit480a16d5c8092f4eac181fb669c7ac05dc446a00
treef1c78cc8141d1319bfe465567a7188d0d86aa2ba
parent339177d1da0c6f0cf181ba987836148acb526926
[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
llvm/include/llvm/MC/MCDisassembler/MCDisassembler.h
llvm/lib/MC/MCDisassembler/MCDisassembler.cpp
llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp
llvm/tools/llvm-objdump/llvm-objdump.cpp