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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 CallKind call_kind, | 115 CallKind call_kind, |
116 int argument_count); | 116 int argument_count); |
117 | 117 |
118 static uword FunctionForRedirect(uword redirect); | 118 static uword FunctionForRedirect(uword redirect); |
119 | 119 |
120 void Longjmp(uword pc, | 120 void Longjmp(uword pc, |
121 uword sp, | 121 uword sp, |
122 uword fp, | 122 uword fp, |
123 RawObject* raw_exception, | 123 RawObject* raw_exception, |
124 RawObject* raw_stacktrace, | 124 RawObject* raw_stacktrace, |
125 Isolate* isolate); | 125 Thread* thread); |
126 | 126 |
127 private: | 127 private: |
128 // Known bad pc value to ensure that the simulator does not execute | 128 // Known bad pc value to ensure that the simulator does not execute |
129 // without being properly setup. | 129 // without being properly setup. |
130 static const uword kBadLR = -1; | 130 static const uword kBadLR = -1; |
131 // A pc value used to signal the simulator to stop execution. Generally | 131 // A pc value used to signal the simulator to stop execution. Generally |
132 // the lr is set to this value on transition from native C code to | 132 // the lr is set to this value on transition from native C code to |
133 // simulated execution, so that the simulator can "return" to the native | 133 // simulated execution, so that the simulator can "return" to the native |
134 // C code. | 134 // C code. |
135 static const uword kEndSimulatingPC = -2; | 135 static const uword kEndSimulatingPC = -2; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 } | 269 } |
270 | 270 |
271 friend class SimulatorDebugger; | 271 friend class SimulatorDebugger; |
272 friend class SimulatorSetjmpBuffer; | 272 friend class SimulatorSetjmpBuffer; |
273 DISALLOW_COPY_AND_ASSIGN(Simulator); | 273 DISALLOW_COPY_AND_ASSIGN(Simulator); |
274 }; | 274 }; |
275 | 275 |
276 } // namespace dart | 276 } // namespace dart |
277 | 277 |
278 #endif // VM_SIMULATOR_ARM64_H_ | 278 #endif // VM_SIMULATOR_ARM64_H_ |
OLD | NEW |