aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorScott Linder <Scott.Linder@amd.com>2023-06-29 16:07:05 +0000
committerScott Linder <Scott.Linder@amd.com>2023-07-06 21:20:51 +0000
commit986001c8274a3f31c3849c16d68ee36a04809986 (patch)
tree08c6cf778938a29cbd0f5a27888e0d52fe532932 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent032de3ee0d3575557f999925fb2d78b9423f3f50 (diff)
downloadllvm-986001c8274a3f31c3849c16d68ee36a04809986.zip
llvm-986001c8274a3f31c3849c16d68ee36a04809986.tar.gz
llvm-986001c8274a3f31c3849c16d68ee36a04809986.tar.bz2
[AMDGPU] Improve assembler + disassembler handling of kernel descriptors
* Relax the AsmParser to accept `.amdhsa_wavefront_size32 0` when the `.amdhsa_shared_vgpr_count` directive is present. * Teach the KD disassembler to respect the setting of KERNEL_CODE_PROPERTY_ENABLE_WAVEFRONT_SIZE32 when calculating the value of `.amdhsa_next_free_vgpr`. * Teach the KD disassembler to disassemble COMPUTE_PGM_RSRC3 for gfx90a and gfx10+. * Include "pseudo directive" comments for gfx10 fields which are not controlled by any assembler directive. * Fix disassembleObject failure diagnostic in llvm-objdump to not hard-code a comment string, and to follow the convention of not capitalizing the first sentence. Reviewed By: rochauha Differential Revision: https://reviews.llvm.org/D128014
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
-rw-r--r--llvm/tools/llvm-objdump/llvm-objdump.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp
index d77b000..bce76ee 100644
--- a/llvm/tools/llvm-objdump/llvm-objdump.cpp
+++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp
@@ -1718,8 +1718,9 @@ static void disassembleObject(const Target *TheTarget, ObjectFile &Obj,
// distance to the next symbol, and sometimes it will be just a
// prologue and we should start disassembling instructions from where
// it left off.
- outs() << "// Error in decoding " << SymNamesHere[SHI]
- << " : Decoding failed region as bytes.\n";
+ outs() << Ctx.getAsmInfo()->getCommentString()
+ << " error in decoding " << SymNamesHere[SHI]
+ << " : decoding failed region as bytes.\n";
for (uint64_t I = 0; I < Size; ++I) {
outs() << "\t.byte\t " << format_hex(Bytes[I], 1, /*Upper=*/true)
<< "\n";