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 ]
PS:
The last 6 bytes of AMDGPU kernel descriptor are reserved and hence 0.
Right now 4 bytes of it are trimmed in llvm-objdump, which makes the kernel descriptor invalid.
I have commented out those AMDGPU specific parts in this commit.
The nop-data.ll test failure in AMDGPU tests is because of this.
Unrelated formatting change. Please revert.