OLD | NEW |
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 // Declares a Simulator for MIPS instructions if we are not generating a native | 5 // Declares a Simulator for MIPS instructions if we are not generating a native |
6 // MIPS binary. This Simulator allows us to run and debug MIPS code generation | 6 // MIPS binary. This Simulator allows us to run and debug MIPS code generation |
7 // on regular desktop machines. | 7 // on regular desktop machines. |
8 // Dart calls into generated code by "calling" the InvokeDartCode stub, | 8 // Dart calls into generated code by "calling" the InvokeDartCode stub, |
9 // which will start execution in the Simulator or forwards to the real entry | 9 // which will start execution in the Simulator or forwards to the real entry |
10 // on a MIPS HW platform. | 10 // on a MIPS HW platform. |
(...skipping 22 matching lines...) Expand all Loading... |
33 | 33 |
34 // Accessors for register state. | 34 // Accessors for register state. |
35 void set_register(Register reg, int32_t value); | 35 void set_register(Register reg, int32_t value); |
36 int32_t get_register(Register reg) const; | 36 int32_t get_register(Register reg) const; |
37 | 37 |
38 // Accessors for floating point register state. | 38 // Accessors for floating point register state. |
39 void set_fregister(FRegister freg, double value); | 39 void set_fregister(FRegister freg, double value); |
40 double get_fregister(FRegister) const; | 40 double get_fregister(FRegister) const; |
41 | 41 |
42 // Accessor for the pc. | 42 // Accessor for the pc. |
| 43 void set_pc(int32_t value) { pc_ = value; } |
43 int32_t get_pc() const { return pc_; } | 44 int32_t get_pc() const { return pc_; } |
44 | 45 |
45 // Accessors for hi, lo registers. | 46 // Accessors for hi, lo registers. |
46 void set_hi_register(int32_t value) { hi_reg_ = value; } | 47 void set_hi_register(int32_t value) { hi_reg_ = value; } |
47 void set_lo_register(int32_t value) { lo_reg_ = value; } | 48 void set_lo_register(int32_t value) { lo_reg_ = value; } |
48 int32_t get_hi_register() const { return hi_reg_; } | 49 int32_t get_hi_register() const { return hi_reg_; } |
49 int32_t get_lo_register() const { return lo_reg_; } | 50 int32_t get_lo_register() const { return lo_reg_; } |
50 | 51 |
51 // Accessor to the internal simulator stack top. | 52 // Accessor to the internal simulator stack top. |
52 uword StackTop() const; | 53 uword StackTop() const; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 | 127 |
127 void Execute(); | 128 void Execute(); |
128 void ExecuteDelaySlot(); | 129 void ExecuteDelaySlot(); |
129 | 130 |
130 friend class SimulatorDebugger; | 131 friend class SimulatorDebugger; |
131 }; | 132 }; |
132 | 133 |
133 } // namespace dart | 134 } // namespace dart |
134 | 135 |
135 #endif // VM_SIMULATOR_MIPS_H_ | 136 #endif // VM_SIMULATOR_MIPS_H_ |
OLD | NEW |