| 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 ARM instructions if we are not generating a native | 5 // Declares a Simulator for ARM instructions if we are not generating a native |
| 6 // ARM binary. This Simulator allows us to run and debug ARM code generation on | 6 // ARM binary. This Simulator allows us to run and debug ARM code generation on |
| 7 // regular desktop machines. | 7 // 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 ARM HW platform. | 10 // on a ARM HW platform. |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 kLeafFloatRuntimeCall, | 120 kLeafFloatRuntimeCall, |
| 121 kBootstrapNativeCall, | 121 kBootstrapNativeCall, |
| 122 kNativeCall | 122 kNativeCall |
| 123 }; | 123 }; |
| 124 static uword RedirectExternalReference(uword function, | 124 static uword RedirectExternalReference(uword function, |
| 125 CallKind call_kind, | 125 CallKind call_kind, |
| 126 int argument_count); | 126 int argument_count); |
| 127 | 127 |
| 128 static uword FunctionForRedirect(uword redirect); | 128 static uword FunctionForRedirect(uword redirect); |
| 129 | 129 |
| 130 void Longjmp(uword pc, | 130 void JumpToFrame(uword pc, uword sp, uword fp, Thread* thread); |
| 131 uword sp, | |
| 132 uword fp, | |
| 133 RawObject* raw_exception, | |
| 134 RawObject* raw_stacktrace, | |
| 135 Thread* thread); | |
| 136 | 131 |
| 137 private: | 132 private: |
| 138 // Known bad pc value to ensure that the simulator does not execute | 133 // Known bad pc value to ensure that the simulator does not execute |
| 139 // without being properly setup. | 134 // without being properly setup. |
| 140 static const uword kBadLR = -1; | 135 static const uword kBadLR = -1; |
| 141 // A pc value used to signal the simulator to stop execution. Generally | 136 // A pc value used to signal the simulator to stop execution. Generally |
| 142 // the lr is set to this value on transition from native C code to | 137 // the lr is set to this value on transition from native C code to |
| 143 // simulated execution, so that the simulator can "return" to the native | 138 // simulated execution, so that the simulator can "return" to the native |
| 144 // C code. | 139 // C code. |
| 145 static const uword kEndSimulatingPC = -2; | 140 static const uword kEndSimulatingPC = -2; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 270 } |
| 276 | 271 |
| 277 friend class SimulatorDebugger; | 272 friend class SimulatorDebugger; |
| 278 friend class SimulatorSetjmpBuffer; | 273 friend class SimulatorSetjmpBuffer; |
| 279 DISALLOW_COPY_AND_ASSIGN(Simulator); | 274 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 280 }; | 275 }; |
| 281 | 276 |
| 282 } // namespace dart | 277 } // namespace dart |
| 283 | 278 |
| 284 #endif // RUNTIME_VM_SIMULATOR_ARM_H_ | 279 #endif // RUNTIME_VM_SIMULATOR_ARM_H_ |
| OLD | NEW |