| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 8 #if defined(TARGET_ARCH_ARM64) | 8 #if defined(TARGET_ARCH_ARM64) |
| 9 #include "platform/assert.h" | 9 #include "platform/assert.h" |
| 10 | 10 |
| (...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 822 } | 822 } |
| 823 | 823 |
| 824 | 824 |
| 825 void ARM64Decoder::DecodeExceptionGen(Instr* instr) { | 825 void ARM64Decoder::DecodeExceptionGen(Instr* instr) { |
| 826 if ((instr->Bits(0, 2) == 1) && (instr->Bits(2, 3) == 0) && | 826 if ((instr->Bits(0, 2) == 1) && (instr->Bits(2, 3) == 0) && |
| 827 (instr->Bits(21, 3) == 0)) { | 827 (instr->Bits(21, 3) == 0)) { |
| 828 Format(instr, "svc 'imm16"); | 828 Format(instr, "svc 'imm16"); |
| 829 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && | 829 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && |
| 830 (instr->Bits(21, 3) == 1)) { | 830 (instr->Bits(21, 3) == 1)) { |
| 831 Format(instr, "brk 'imm16"); | 831 Format(instr, "brk 'imm16"); |
| 832 if (instr->Imm16Field() == Instr::kStopMessageCode) { |
| 833 const char* message = *reinterpret_cast<const char**>( |
| 834 reinterpret_cast<intptr_t>(instr) - 2 * Instr::kInstrSize); |
| 835 buffer_pos_ += OS::SNPrint(current_position_in_buffer(), |
| 836 remaining_size_in_buffer(), |
| 837 " ; \"%s\"", |
| 838 message); |
| 839 } |
| 832 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && | 840 } else if ((instr->Bits(0, 2) == 0) && (instr->Bits(2, 3) == 0) && |
| 833 (instr->Bits(21, 3) == 2)) { | 841 (instr->Bits(21, 3) == 2)) { |
| 834 Format(instr, "hlt 'imm16"); | 842 Format(instr, "hlt 'imm16"); |
| 835 } else { | 843 } else { |
| 836 Unknown(instr); | 844 Unknown(instr); |
| 837 } | 845 } |
| 838 } | 846 } |
| 839 | 847 |
| 840 | 848 |
| 841 void ARM64Decoder::DecodeSystem(Instr* instr) { | 849 void ARM64Decoder::DecodeSystem(Instr* instr) { |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1434 int32_t instruction_bits = Instr::At(pc)->InstructionBits(); | 1442 int32_t instruction_bits = Instr::At(pc)->InstructionBits(); |
| 1435 OS::SNPrint(hex_buffer, hex_size, "%08x", instruction_bits); | 1443 OS::SNPrint(hex_buffer, hex_size, "%08x", instruction_bits); |
| 1436 if (out_instr_size) { | 1444 if (out_instr_size) { |
| 1437 *out_instr_size = Instr::kInstrSize; | 1445 *out_instr_size = Instr::kInstrSize; |
| 1438 } | 1446 } |
| 1439 } | 1447 } |
| 1440 | 1448 |
| 1441 } // namespace dart | 1449 } // namespace dart |
| 1442 | 1450 |
| 1443 #endif // defined TARGET_ARCH_ARM | 1451 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |