Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: runtime/vm/disassembler_arm64.cc

Issue 1097413004: Use a breakpoint instruction for a stop message on arm instead of (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/disassembler_arm.cc ('k') | runtime/vm/disassembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698