Improvements to the ARM64 disassembler.
This contains three changes:
- Use register aliases in the disassembly.
- When loading from a literal pool, show what is being loaded.
- Disassemble using absolute addresses on ARM64.
This ensures that addresses disassembled are coherent with instruction
location addresses shown.
Examples of disassembled instructions before and after the changes:
Before:
movz w17, #0x471f
ldr d9, pc+736 (addr 0x72690d50)
After:
movz wip1, #0x471f
ldr d9, pc+736 (addr 0x72690d50) (-745.133)
Change-Id: I72fdc160fac26f74126921834f17a581c26fd5d8
diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc
index f565277..ece9f7d 100644
--- a/oatdump/oatdump.cc
+++ b/oatdump/oatdump.cc
@@ -374,7 +374,8 @@
options_(options),
disassembler_(Disassembler::Create(oat_file_.GetOatHeader().GetInstructionSet(),
new DisassemblerOptions(options_->absolute_addresses_,
- oat_file.Begin()))) {
+ oat_file.Begin(),
+ true /* can_read_litals_ */))) {
CHECK(options_->class_loader_ != nullptr);
AddAllOffsets();
}