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

Unified Diff: runtime/vm/simulator_mips.h

Issue 12541003: - Add a skeleton MIPS assembler, disassembler and simulator. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/simulator_mips.h
===================================================================
--- runtime/vm/simulator_mips.h (revision 19556)
+++ runtime/vm/simulator_mips.h (working copy)
@@ -48,11 +48,32 @@
int32_t parameter0,
int32_t parameter1,
int32_t parameter2,
- int32_t parameter3,
- int32_t parameter4);
+ int32_t parameter3);
private:
+ // A pc value used to signal the simulator to stop execution. Generally
+ // the ra is set to this value on transition from native C code to
+ // simulated execution, so that the simulator can "return" to the native
+ // C code.
+ static const uword kEndSimulatingPC = -1;
+
+ int32_t registers_[kNumberOfCpuRegisters];
+ uword pc_;
+
+ // Simulator support.
char* stack_;
+ int icount_;
+ bool delay_slot_;
+
+ void set_pc(uword value) { pc_ = value; }
+
+ void Format(Instr* instr, const char* format);
+
+ void DecodeSpecial(Instr* instr);
+ void InstructionDecode(Instr* instr);
+
+ void Execute();
+ void ExecuteDelaySlot();
};
} // namespace dart

Powered by Google App Engine
This is Rietveld 408576698