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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 void DecodeSpecial(Instr* instr); | 235 void DecodeSpecial(Instr* instr); |
236 void DecodeSpecial2(Instr* instr); | 236 void DecodeSpecial2(Instr* instr); |
237 void DecodeRegImm(Instr* instr); | 237 void DecodeRegImm(Instr* instr); |
238 void DecodeCop1(Instr* instr); | 238 void DecodeCop1(Instr* instr); |
239 void InstructionDecode(Instr* instr); | 239 void InstructionDecode(Instr* instr); |
240 | 240 |
241 void Execute(); | 241 void Execute(); |
242 void ExecuteDelaySlot(); | 242 void ExecuteDelaySlot(); |
243 | 243 |
| 244 // Returns true if tracing of executed instructions is enabled. |
| 245 bool IsTracingExecution() const; |
| 246 |
244 // Longjmp support for exceptions. | 247 // Longjmp support for exceptions. |
245 SimulatorSetjmpBuffer* last_setjmp_buffer() { | 248 SimulatorSetjmpBuffer* last_setjmp_buffer() { |
246 return last_setjmp_buffer_; | 249 return last_setjmp_buffer_; |
247 } | 250 } |
248 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { | 251 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { |
249 last_setjmp_buffer_ = buffer; | 252 last_setjmp_buffer_ = buffer; |
250 } | 253 } |
251 | 254 |
252 friend class SimulatorDebugger; | 255 friend class SimulatorDebugger; |
253 friend class SimulatorSetjmpBuffer; | 256 friend class SimulatorSetjmpBuffer; |
254 DISALLOW_COPY_AND_ASSIGN(Simulator); | 257 DISALLOW_COPY_AND_ASSIGN(Simulator); |
255 }; | 258 }; |
256 | 259 |
257 } // namespace dart | 260 } // namespace dart |
258 | 261 |
259 #endif // VM_SIMULATOR_MIPS_H_ | 262 #endif // VM_SIMULATOR_MIPS_H_ |
OLD | NEW |