OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/disassembler.h" | 5 #include "vm/disassembler.h" |
6 | 6 |
7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
8 #if defined(TARGET_ARCH_MIPS) | 8 #if defined(TARGET_ARCH_MIPS) |
9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
10 | 10 |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 case ADDU: { | 297 case ADDU: { |
298 Format(instr, "addu 'rd, 'rs, 'rt"); | 298 Format(instr, "addu 'rd, 'rs, 'rt"); |
299 break; | 299 break; |
300 } | 300 } |
301 case AND: { | 301 case AND: { |
302 Format(instr, "and 'rd, 'rs, 'rt"); | 302 Format(instr, "and 'rd, 'rs, 'rt"); |
303 break; | 303 break; |
304 } | 304 } |
305 case BREAK: { | 305 case BREAK: { |
306 Format(instr, "break 'code"); | 306 Format(instr, "break 'code"); |
| 307 if (instr->BreakCodeField() == Instr::kStopMessageCode) { |
| 308 const char* message = *reinterpret_cast<const char**>( |
| 309 reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize); |
| 310 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), |
| 311 remaining_size_in_buffer(), |
| 312 " ; \"%s\"", |
| 313 message); |
| 314 } |
307 break; | 315 break; |
308 } | 316 } |
309 case DIV: { | 317 case DIV: { |
310 Format(instr, "div 'rs, 'rt"); | 318 Format(instr, "div 'rs, 'rt"); |
311 break; | 319 break; |
312 } | 320 } |
313 case DIVU: { | 321 case DIVU: { |
314 Format(instr, "divu 'rs, 'rt"); | 322 Format(instr, "divu 'rs, 'rt"); |
315 break; | 323 break; |
316 } | 324 } |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
758 decoder.InstructionDecode(instr); | 766 decoder.InstructionDecode(instr); |
759 OS::SNPrint(hex_buffer, hex_size, "%08x", instr->InstructionBits()); | 767 OS::SNPrint(hex_buffer, hex_size, "%08x", instr->InstructionBits()); |
760 if (out_instr_len) { | 768 if (out_instr_len) { |
761 *out_instr_len = Instr::kInstrSize; | 769 *out_instr_len = Instr::kInstrSize; |
762 } | 770 } |
763 } | 771 } |
764 | 772 |
765 } // namespace dart | 773 } // namespace dart |
766 | 774 |
767 #endif // defined TARGET_ARCH_MIPS | 775 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |