OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 ARM64 instructions if we are not generating a native | 5 // Declares a Simulator for ARM64 instructions if we are not generating a native |
6 // ARM64 binary. This Simulator allows us to run and debug ARM64 code generation | 6 // ARM64 binary. This Simulator allows us to run and debug ARM64 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 ARM64 HW platform. | 10 // on a ARM64 HW platform. |
(...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 // Decode instructions. | 249 // Decode instructions. |
250 void InstructionDecode(Instr* instr); | 250 void InstructionDecode(Instr* instr); |
251 #define DECODE_OP(op) \ | 251 #define DECODE_OP(op) \ |
252 void Decode##op(Instr* instr); | 252 void Decode##op(Instr* instr); |
253 APPLY_OP_LIST(DECODE_OP) | 253 APPLY_OP_LIST(DECODE_OP) |
254 #undef DECODE_OP | 254 #undef DECODE_OP |
255 | 255 |
256 // Executes ARM64 instructions until the PC reaches kEndSimulatingPC. | 256 // Executes ARM64 instructions until the PC reaches kEndSimulatingPC. |
257 void Execute(); | 257 void Execute(); |
258 | 258 |
| 259 // Returns true if tracing of executed instructions is enabled. |
| 260 bool IsTracingExecution() const; |
| 261 |
259 // Longjmp support for exceptions. | 262 // Longjmp support for exceptions. |
260 SimulatorSetjmpBuffer* last_setjmp_buffer() { | 263 SimulatorSetjmpBuffer* last_setjmp_buffer() { |
261 return last_setjmp_buffer_; | 264 return last_setjmp_buffer_; |
262 } | 265 } |
263 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { | 266 void set_last_setjmp_buffer(SimulatorSetjmpBuffer* buffer) { |
264 last_setjmp_buffer_ = buffer; | 267 last_setjmp_buffer_ = buffer; |
265 } | 268 } |
266 | 269 |
267 friend class SimulatorDebugger; | 270 friend class SimulatorDebugger; |
268 friend class SimulatorSetjmpBuffer; | 271 friend class SimulatorSetjmpBuffer; |
269 DISALLOW_COPY_AND_ASSIGN(Simulator); | 272 DISALLOW_COPY_AND_ASSIGN(Simulator); |
270 }; | 273 }; |
271 | 274 |
272 } // namespace dart | 275 } // namespace dart |
273 | 276 |
274 #endif // VM_SIMULATOR_ARM64_H_ | 277 #endif // VM_SIMULATOR_ARM64_H_ |
OLD | NEW |