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

Side by Side Diff: src/arm/simulator-arm.cc

Issue 2744503003: [simulator] remove unused argument field for stop/breaks. (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
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 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 #include <cmath> 7 #include <cmath>
8 8
9 #if V8_TARGET_ARCH_ARM 9 #if V8_TARGET_ARCH_ARM
10 10
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 PrintF("Z flag: %d; ", sim_->z_flag_); 425 PrintF("Z flag: %d; ", sim_->z_flag_);
426 PrintF("C flag: %d; ", sim_->c_flag_); 426 PrintF("C flag: %d; ", sim_->c_flag_);
427 PrintF("V flag: %d\n", sim_->v_flag_); 427 PrintF("V flag: %d\n", sim_->v_flag_);
428 PrintF("INVALID OP flag: %d; ", sim_->inv_op_vfp_flag_); 428 PrintF("INVALID OP flag: %d; ", sim_->inv_op_vfp_flag_);
429 PrintF("DIV BY ZERO flag: %d; ", sim_->div_zero_vfp_flag_); 429 PrintF("DIV BY ZERO flag: %d; ", sim_->div_zero_vfp_flag_);
430 PrintF("OVERFLOW flag: %d; ", sim_->overflow_vfp_flag_); 430 PrintF("OVERFLOW flag: %d; ", sim_->overflow_vfp_flag_);
431 PrintF("UNDERFLOW flag: %d; ", sim_->underflow_vfp_flag_); 431 PrintF("UNDERFLOW flag: %d; ", sim_->underflow_vfp_flag_);
432 PrintF("INEXACT flag: %d;\n", sim_->inexact_vfp_flag_); 432 PrintF("INEXACT flag: %d;\n", sim_->inexact_vfp_flag_);
433 } else if (strcmp(cmd, "stop") == 0) { 433 } else if (strcmp(cmd, "stop") == 0) {
434 int32_t value; 434 int32_t value;
435 intptr_t stop_pc = sim_->get_pc() - 2 * Instruction::kInstrSize; 435 intptr_t stop_pc = sim_->get_pc() - Instruction::kInstrSize;
436 Instruction* stop_instr = reinterpret_cast<Instruction*>(stop_pc); 436 Instruction* stop_instr = reinterpret_cast<Instruction*>(stop_pc);
437 Instruction* msg_address =
438 reinterpret_cast<Instruction*>(stop_pc + Instruction::kInstrSize);
439 if ((argc == 2) && (strcmp(arg1, "unstop") == 0)) { 437 if ((argc == 2) && (strcmp(arg1, "unstop") == 0)) {
440 // Remove the current stop. 438 // Remove the current stop.
441 if (sim_->isStopInstruction(stop_instr)) { 439 if (sim_->isStopInstruction(stop_instr)) {
442 stop_instr->SetInstructionBits(kNopInstr); 440 stop_instr->SetInstructionBits(kNopInstr);
443 msg_address->SetInstructionBits(kNopInstr);
444 } else { 441 } else {
445 PrintF("Not at debugger stop.\n"); 442 PrintF("Not at debugger stop.\n");
446 } 443 }
447 } else if (argc == 3) { 444 } else if (argc == 3) {
448 // Print information about all/the specified breakpoint(s). 445 // Print information about all/the specified breakpoint(s).
449 if (strcmp(arg1, "info") == 0) { 446 if (strcmp(arg1, "info") == 0) {
450 if (strcmp(arg2, "all") == 0) { 447 if (strcmp(arg2, "all") == 0) {
451 PrintF("Stop information:\n"); 448 PrintF("Stop information:\n");
452 for (uint32_t i = 0; i < sim_->kNumOfWatchedStops; i++) { 449 for (uint32_t i = 0; i < sim_->kNumOfWatchedStops; i++) {
453 sim_->PrintStopInfo(i); 450 sim_->PrintStopInfo(i);
(...skipping 5210 matching lines...) Expand 10 before | Expand all | Expand 10 after
5664 } 5661 }
5665 case 7: { 5662 case 7: {
5666 DecodeType7(instr); 5663 DecodeType7(instr);
5667 break; 5664 break;
5668 } 5665 }
5669 default: { 5666 default: {
5670 UNIMPLEMENTED(); 5667 UNIMPLEMENTED();
5671 break; 5668 break;
5672 } 5669 }
5673 } 5670 }
5674 // If the instruction is a non taken conditional stop, we need to skip the
5675 // inlined message address.
5676 } else if (instr->IsStop()) {
5677 set_pc(get_pc() + 2 * Instruction::kInstrSize);
5678 } 5671 }
5679 if (!pc_modified_) { 5672 if (!pc_modified_) {
5680 set_register(pc, reinterpret_cast<int32_t>(instr) 5673 set_register(pc, reinterpret_cast<int32_t>(instr)
5681 + Instruction::kInstrSize); 5674 + Instruction::kInstrSize);
5682 } 5675 }
5683 } 5676 }
5684 5677
5685 5678
5686 void Simulator::Execute() { 5679 void Simulator::Execute() {
5687 // Get the PC to simulate. Cannot use the accessor here as we need the 5680 // Get the PC to simulate. Cannot use the accessor here as we need the
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
6059 processor->prev_ = nullptr; 6052 processor->prev_ = nullptr;
6060 processor->next_ = nullptr; 6053 processor->next_ = nullptr;
6061 } 6054 }
6062 6055
6063 } // namespace internal 6056 } // namespace internal
6064 } // namespace v8 6057 } // namespace v8
6065 6058
6066 #endif // USE_SIMULATOR 6059 #endif // USE_SIMULATOR
6067 6060
6068 #endif // V8_TARGET_ARCH_ARM 6061 #endif // V8_TARGET_ARCH_ARM
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698