[PATCH] D80512: [MC] Changes to help improve target specific symbol disassembly
Ronak Chauhan via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 13:05:48 PDT 2020
rochauha updated this revision to Diff 266304.
rochauha added a comment.
Changes to MCDisassembler and llvm-objdump to allow targets to also decode entire symbols.
Not all symbols need to be disassembled as instructions.
Targets can handle certain symbols as part of --disassemble-all; in a way that they require.
WebAssembly uses the onSymbolStart hook to handle preludes.
This commit tries to generalize onSymbolStart so that other targets can also use it (if they want to)
Now the entire symbol can be to be disassembled in a target specific way. We then move to the next
symbol or fall back (only if the symbol is not disassembled entirely) to decoding remaining bytes as instructions.
AMDGPU needs it to decode kernel descriptors as assembler directives rather than instructions.
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. [ will make a review for this soon ]
Edit:
- Uncommented lines in llvm-objdump that broke test/CodeGen/AMDGPU/nop-data.ll (as pointed out by jhenderson)
- Small change to the new helper functions to read bytes
- Changes to this summary
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80512/new/
https://reviews.llvm.org/D80512
Files:
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80512.266304.patch
Type: text/x-patch
Size: 10440 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200526/ddf6f80c/attachment.bin>
More information about the llvm-commits
mailing list