diff options
author | David Srbecky <dsrbecky@google.com> | 2015-04-07 12:38:57 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2015-04-07 12:38:59 +0000 |
commit | caff30245889729f102af87e79705893401251ef (patch) | |
tree | 4793d6d6bc4adab2ad61e6876b5a24996fb365d6 /disassembler | |
parent | 030d304aec321a21a4d577f3e7b4cd8e912ef901 (diff) | |
parent | d2c80c419f1e16875f556de371e10257bcb59075 (diff) | |
download | art-caff30245889729f102af87e79705893401251ef.zip art-caff30245889729f102af87e79705893401251ef.tar.gz art-caff30245889729f102af87e79705893401251ef.tar.bz2 |
Merge "Fix address formatting in Mips64 disassembler."
Diffstat (limited to 'disassembler')
-rw-r--r-- | disassembler/disassembler_mips64.cc | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/disassembler/disassembler_mips64.cc b/disassembler/disassembler_mips64.cc index 1b6e6be..f1c7d8e 100644 --- a/disassembler/disassembler_mips64.cc +++ b/disassembler/disassembler_mips64.cc @@ -185,7 +185,7 @@ static uint32_t ReadU32(const uint8_t* ptr) { return ptr[0] | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24); } -static void DumpMips64(std::ostream& os, const uint8_t* instr_ptr) { +size_t DisassemblerMips64::Dump(std::ostream& os, const uint8_t* instr_ptr) { uint32_t instruction = ReadU32(instr_ptr); uint32_t rs = (instruction >> 21) & 0x1f; // I-type, R-type. @@ -272,19 +272,16 @@ static void DumpMips64(std::ostream& os, const uint8_t* instr_ptr) { } } - os << StringPrintf("%p: %08x\t%-7s ", instr_ptr, instruction, opcode.c_str()) + os << FormatInstructionPointer(instr_ptr) + << StringPrintf(": %08x\t%-7s ", instruction, opcode.c_str()) << args.str() << '\n'; -} - -size_t DisassemblerMips64::Dump(std::ostream& os, const uint8_t* begin) { - DumpMips64(os, begin); return 4; } void DisassemblerMips64::Dump(std::ostream& os, const uint8_t* begin, const uint8_t* end) { for (const uint8_t* cur = begin; cur < end; cur += 4) { - DumpMips64(os, cur); + Dump(os, cur); } } |