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

Unified Diff: runtime/vm/simulator_mips.cc

Issue 14246039: Implements features to run "Hello, world!" on simulated MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/simulator_mips.cc
===================================================================
--- runtime/vm/simulator_mips.cc (revision 21753)
+++ runtime/vm/simulator_mips.cc (working copy)
@@ -751,9 +751,9 @@
void Simulator::UnalignedAccess(const char* msg, uword addr, Instr* instr) {
// The debugger will not be able to single step past this instruction, but
// it will be possible to disassemble the code and inspect registers.
- char buffer[64];
+ char buffer[128];
snprintf(buffer, sizeof(buffer),
- "unaligned %s at 0x%"Px", pc=%p\n", msg, addr, instr);
+ "pc=%p, unaligned %s at 0x%"Px"\n", instr, msg, addr);
SimulatorDebugger dbg(this);
dbg.Stop(instr, buffer);
// The debugger will return control in non-interactive mode.
@@ -905,6 +905,15 @@
dbg.Stop(instr, message);
// Adjust for extra pc increment.
set_pc(get_pc() - Instr::kInstrSize);
+ } else if (instr->BreakCodeField() == Instr::kMsgMessageCode) {
+ const char* message = *reinterpret_cast<const char**>(
+ reinterpret_cast<intptr_t>(instr) - Instr::kInstrSize);
+ if (FLAG_trace_sim) {
+ OS::Print("Message: %s\n", message);
+ } else {
+ OS::PrintErr("Bad break code: 0x%x\n", instr->InstructionBits());
+ UnimplementedInstruction(instr);
+ }
} else if (instr->BreakCodeField() == Instr::kRedirectCode) {
SimulatorSetjmpBuffer buffer(this);

Powered by Google App Engine
This is Rietveld 408576698