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

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

Issue 2178093003: [snapshot] do not embed string addresses in code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips64/assembler-mips64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 <limits.h> 5 #include <limits.h>
6 #include <stdarg.h> 6 #include <stdarg.h>
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <cmath> 8 #include <cmath>
9 9
10 #if V8_TARGET_ARCH_MIPS 10 #if V8_TARGET_ARCH_MIPS
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 #else // GENERATED_CODE_COVERAGE 131 #else // GENERATED_CODE_COVERAGE
132 132
133 #define UNSUPPORTED() printf("Sim: Unsupported instruction.\n"); 133 #define UNSUPPORTED() printf("Sim: Unsupported instruction.\n");
134 134
135 static void InitializeCoverage() {} 135 static void InitializeCoverage() {}
136 136
137 137
138 void MipsDebugger::Stop(Instruction* instr) { 138 void MipsDebugger::Stop(Instruction* instr) {
139 // Get the stop code. 139 // Get the stop code.
140 uint32_t code = instr->Bits(25, 6); 140 uint32_t code = instr->Bits(25, 6);
141 // Retrieve the encoded address, which comes just after this stop. 141 PrintF("Simulator hit (%u)\n", code);
142 char* msg = *reinterpret_cast<char**>(sim_->get_pc() +
143 Instruction::kInstrSize);
144 // Update this stop description.
145 if (!sim_->watched_stops_[code].desc) {
146 sim_->watched_stops_[code].desc = msg;
147 }
148 PrintF("Simulator hit %s (%u)\n", msg, code);
149 sim_->set_pc(sim_->get_pc() + 2 * Instruction::kInstrSize); 142 sim_->set_pc(sim_->get_pc() + 2 * Instruction::kInstrSize);
150 Debug(); 143 Debug();
151 } 144 }
152 #endif // GENERATED_CODE_COVERAGE 145 #endif // GENERATED_CODE_COVERAGE
153 146
154 147
155 int32_t MipsDebugger::GetRegisterValue(int regnum) { 148 int32_t MipsDebugger::GetRegisterValue(int regnum) {
156 if (regnum == kNumSimuRegisters) { 149 if (regnum == kNumSimuRegisters) {
157 return sim_->get_pc(); 150 return sim_->get_pc();
158 } else { 151 } else {
(...skipping 4479 matching lines...) Expand 10 before | Expand all | Expand 10 after
4638 4631
4639 4632
4640 #undef UNSUPPORTED 4633 #undef UNSUPPORTED
4641 4634
4642 } // namespace internal 4635 } // namespace internal
4643 } // namespace v8 4636 } // namespace v8
4644 4637
4645 #endif // USE_SIMULATOR 4638 #endif // USE_SIMULATOR
4646 4639
4647 #endif // V8_TARGET_ARCH_MIPS 4640 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.cc ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698