| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // A Disassembler object is used to disassemble a block of code instruction by | 5 // A Disassembler object is used to disassemble a block of code instruction by |
| 6 // instruction. The default implementation of the NameConverter object can be | 6 // instruction. The default implementation of the NameConverter object can be |
| 7 // overriden to modify register names or to do symbol lookup on addresses. | 7 // overriden to modify register names or to do symbol lookup on addresses. |
| 8 // | 8 // |
| 9 // The example below will disassemble a block of code and print it to stdout. | 9 // The example below will disassemble a block of code and print it to stdout. |
| 10 // | 10 // |
| (...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 Format(instr, "unknown"); | 796 Format(instr, "unknown"); |
| 797 } | 797 } |
| 798 | 798 |
| 799 | 799 |
| 800 int Decoder::DecodeBreakInstr(Instruction* instr) { | 800 int Decoder::DecodeBreakInstr(Instruction* instr) { |
| 801 // This is already known to be BREAK instr, just extract the code. | 801 // This is already known to be BREAK instr, just extract the code. |
| 802 if (instr->Bits(25, 6) == static_cast<int>(kMaxStopCode)) { | 802 if (instr->Bits(25, 6) == static_cast<int>(kMaxStopCode)) { |
| 803 // This is stop(msg). | 803 // This is stop(msg). |
| 804 Format(instr, "break, code: 'code"); | 804 Format(instr, "break, code: 'code"); |
| 805 out_buffer_pos_ += SNPrintF( | 805 out_buffer_pos_ += SNPrintF( |
| 806 out_buffer_ + out_buffer_pos_, | 806 out_buffer_ + out_buffer_pos_, "\n%p %08" PRIx64, |
| 807 "\n%p %08" PRIx64 " stop msg: %s", | |
| 808 static_cast<void*>( | 807 static_cast<void*>( |
| 809 reinterpret_cast<int32_t*>(instr + Instruction::kInstrSize)), | 808 reinterpret_cast<int32_t*>(instr + Instruction::kInstrSize)), |
| 810 reinterpret_cast<uint64_t>( | 809 reinterpret_cast<uint64_t>( |
| 811 *reinterpret_cast<char**>(instr + Instruction::kInstrSize)), | 810 *reinterpret_cast<char**>(instr + Instruction::kInstrSize))); |
| 812 *reinterpret_cast<char**>(instr + Instruction::kInstrSize)); | |
| 813 // Size 3: the break_ instr, plus embedded 64-bit char pointer. | 811 // Size 3: the break_ instr, plus embedded 64-bit char pointer. |
| 814 return 3 * Instruction::kInstrSize; | 812 return 3 * Instruction::kInstrSize; |
| 815 } else { | 813 } else { |
| 816 Format(instr, "break, code: 'code"); | 814 Format(instr, "break, code: 'code"); |
| 817 return Instruction::kInstrSize; | 815 return Instruction::kInstrSize; |
| 818 } | 816 } |
| 819 } | 817 } |
| 820 | 818 |
| 821 | 819 |
| 822 bool Decoder::DecodeTypeRegisterRsType(Instruction* instr) { | 820 bool Decoder::DecodeTypeRegisterRsType(Instruction* instr) { |
| (...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2016 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 2014 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
| 2017 } | 2015 } |
| 2018 } | 2016 } |
| 2019 | 2017 |
| 2020 | 2018 |
| 2021 #undef UNSUPPORTED | 2019 #undef UNSUPPORTED |
| 2022 | 2020 |
| 2023 } // namespace disasm | 2021 } // namespace disasm |
| 2024 | 2022 |
| 2025 #endif // V8_TARGET_ARCH_MIPS64 | 2023 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |