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

Side by Side Diff: runtime/vm/disassembler_arm.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/constants_arm64.h ('k') | runtime/vm/disassembler_arm64.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) 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_ARM. 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
8 #if defined(TARGET_ARCH_ARM) 8 #if defined(TARGET_ARCH_ARM)
9 9
10 #include "platform/assert.h" 10 #include "platform/assert.h"
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 Format(instr, "blx'cond 'rm"); 676 Format(instr, "blx'cond 'rm");
677 } else { 677 } else {
678 // Could be inlined constant. 678 // Could be inlined constant.
679 Unknown(instr); 679 Unknown(instr);
680 } 680 }
681 break; 681 break;
682 } 682 }
683 case 7: { 683 case 7: {
684 if ((instr->Bits(21, 2) == 0x1) && (instr->ConditionField() == AL)) { 684 if ((instr->Bits(21, 2) == 0x1) && (instr->ConditionField() == AL)) {
685 Format(instr, "bkpt #'imm12_4"); 685 Format(instr, "bkpt #'imm12_4");
686 if (instr->BkptField() == Instr::kStopMessageCode) {
687 const char* message = *reinterpret_cast<const char**>(
688 reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize);
689 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
690 remaining_size_in_buffer(),
691 " ; \"%s\"",
692 message);
693 }
686 } else { 694 } else {
687 // Format(instr, "smc'cond"); 695 // Format(instr, "smc'cond");
688 Unknown(instr); // Not used. 696 Unknown(instr); // Not used.
689 } 697 }
690 break; 698 break;
691 } 699 }
692 default: { 700 default: {
693 Unknown(instr); // Not used. 701 Unknown(instr); // Not used.
694 break; 702 break;
695 } 703 }
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 } 1101 }
1094 } else { 1102 } else {
1095 Unknown(instr); 1103 Unknown(instr);
1096 } 1104 }
1097 } 1105 }
1098 1106
1099 1107
1100 void ARMDecoder::DecodeType7(Instr* instr) { 1108 void ARMDecoder::DecodeType7(Instr* instr) {
1101 if (instr->Bit(24) == 1) { 1109 if (instr->Bit(24) == 1) {
1102 Format(instr, "svc'cond #'svc"); 1110 Format(instr, "svc'cond #'svc");
1103 if (instr->SvcField() == kStopMessageSvcCode) {
1104 const char* message = *reinterpret_cast<const char**>(
1105 reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize);
1106 buffer_pos_ += OS::SNPrint(current_position_in_buffer(),
1107 remaining_size_in_buffer(),
1108 " ; \"%s\"",
1109 message);
1110 }
1111 } else if (instr->IsVFPDataProcessingOrSingleTransfer()) { 1111 } else if (instr->IsVFPDataProcessingOrSingleTransfer()) {
1112 if (instr->Bit(4) == 0) { 1112 if (instr->Bit(4) == 0) {
1113 // VFP Data Processing 1113 // VFP Data Processing
1114 switch (instr->Bits(20, 4) & 0xb) { 1114 switch (instr->Bits(20, 4) & 0xb) {
1115 case 0: { // vmla, vmls floating-point 1115 case 0: { // vmla, vmls floating-point
1116 if (instr->Bit(8) == 0) { 1116 if (instr->Bit(8) == 0) {
1117 if (instr->Bit(6) == 0) { 1117 if (instr->Bit(6) == 0) {
1118 Format(instr, "vmlas'cond 'sd, 'sn, 'sm"); 1118 Format(instr, "vmlas'cond 'sd, 'sn, 'sm");
1119 } else { 1119 } else {
1120 Format(instr, "vmlss'cond 'sd, 'sn, 'sm"); 1120 Format(instr, "vmlss'cond 'sd, 'sn, 'sm");
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
1531 int32_t instruction_bits = Instr::At(pc)->InstructionBits(); 1531 int32_t instruction_bits = Instr::At(pc)->InstructionBits();
1532 OS::SNPrint(hex_buffer, hex_size, "%08x", instruction_bits); 1532 OS::SNPrint(hex_buffer, hex_size, "%08x", instruction_bits);
1533 if (out_instr_size) { 1533 if (out_instr_size) {
1534 *out_instr_size = Instr::kInstrSize; 1534 *out_instr_size = Instr::kInstrSize;
1535 } 1535 }
1536 } 1536 }
1537 1537
1538 } // namespace dart 1538 } // namespace dart
1539 1539
1540 #endif // defined TARGET_ARCH_ARM 1540 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/constants_arm64.h ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698