| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 inline int8_t ReadB(uword addr); | 111 inline int8_t ReadB(uword addr); |
| 112 inline uint8_t ReadBU(uword addr); | 112 inline uint8_t ReadBU(uword addr); |
| 113 inline int16_t ReadH(uword addr, Instr* instr); | 113 inline int16_t ReadH(uword addr, Instr* instr); |
| 114 inline uint16_t ReadHU(uword addr, Instr *instr); | 114 inline uint16_t ReadHU(uword addr, Instr *instr); |
| 115 inline int ReadW(uword addr, Instr* instr); | 115 inline int ReadW(uword addr, Instr* instr); |
| 116 | 116 |
| 117 inline void WriteB(uword addr, uint8_t value); | 117 inline void WriteB(uword addr, uint8_t value); |
| 118 inline void WriteH(uword addr, uint16_t value, Instr* isntr); | 118 inline void WriteH(uword addr, uint16_t value, Instr* isntr); |
| 119 inline void WriteW(uword addr, int value, Instr* instr); | 119 inline void WriteW(uword addr, int value, Instr* instr); |
| 120 | 120 |
| 121 void DoBranch(Instr* instr, bool taken, bool likely); |
| 121 void DecodeSpecial(Instr* instr); | 122 void DecodeSpecial(Instr* instr); |
| 122 void DecodeSpecial2(Instr* instr); | 123 void DecodeSpecial2(Instr* instr); |
| 124 void DecodeRegImm(Instr* instr); |
| 123 void InstructionDecode(Instr* instr); | 125 void InstructionDecode(Instr* instr); |
| 124 | 126 |
| 125 void Execute(); | 127 void Execute(); |
| 126 void ExecuteDelaySlot(); | 128 void ExecuteDelaySlot(); |
| 127 | 129 |
| 128 friend class SimulatorDebugger; | 130 friend class SimulatorDebugger; |
| 129 }; | 131 }; |
| 130 | 132 |
| 131 } // namespace dart | 133 } // namespace dart |
| 132 | 134 |
| 133 #endif // VM_SIMULATOR_MIPS_H_ | 135 #endif // VM_SIMULATOR_MIPS_H_ |
| OLD | NEW |