Page MenuHomePhabricator

[PowerPC][llvm-objdump] enable --symbolize-operands for PowerPC ELF/XCOFF.
Needs ReviewPublic

Authored by Esme on Tue, Nov 23, 6:08 PM.

Details

Reviewers
jhenderson
shchenz
qiucf
jsji
MaskRay
Group Reviewers
Restricted Project
Summary
--symbolize-operands
When disassembling, symbolize a branch target operand to print a label instead of a real address.

Diff Detail

Event Timeline

Esme created this revision.Tue, Nov 23, 6:08 PM
Esme requested review of this revision.Tue, Nov 23, 6:08 PM
Herald added a project: Restricted Project. · View Herald TranscriptTue, Nov 23, 6:08 PM
MaskRay added inline comments.Tue, Nov 23, 6:53 PM
llvm/test/tools/llvm-objdump/ELF/PowerPC/elf-disassemble-symbolize-operands.yaml
7

Add -NEXT:

43

obj2yaml created test file has many redundant things which are noise, e.g. eh_frame, .note.GNU-stack, STT_FILE. They can all be deleted.

How about using assembly with llvm-mc -filetype=obj? The main thing to test is the code sequence which is opaque as the yaml test (Content). An assembly test is easier to update.

llvm/tools/llvm-objdump/llvm-objdump.cpp
981

You can order PowerPC before X86 for an alphabetical order.

jhenderson added inline comments.Thu, Nov 25, 1:04 AM
llvm/test/tools/llvm-objdump/ELF/PowerPC/elf-disassemble-symbolize-operands.yaml
1

Don't prefix test names with elf- if they're in an ELF subdirectory.

llvm/test/tools/llvm-objdump/XCOFF/disassemble-symbolize-operands.yaml
17–18

Similar comment to MaskRay's above - the input probably wants to just be IR or assembly.