| 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 JumpToFrame(uword pc, uword sp, uword fp, Thread* thread); | 130 void Longjmp(uword pc, |
| 131 uword sp, |
| 132 uword fp, |
| 133 RawObject* raw_exception, |
| 134 RawObject* raw_stacktrace, |
| 135 Thread* thread); |
| 131 | 136 |
| 132 private: | 137 private: |
| 133 // Known bad pc value to ensure that the simulator does not execute | 138 // Known bad pc value to ensure that the simulator does not execute |
| 134 // without being properly setup. | 139 // without being properly setup. |
| 135 static const uword kBadLR = -1; | 140 static const uword kBadLR = -1; |
| 136 // A pc value used to signal the simulator to stop execution. Generally | 141 // A pc value used to signal the simulator to stop execution. Generally |
| 137 // the lr is set to this value on transition from native C code to | 142 // the lr is set to this value on transition from native C code to |
| 138 // simulated execution, so that the simulator can "return" to the native | 143 // simulated execution, so that the simulator can "return" to the native |
| 139 // C code. | 144 // C code. |
| 140 static const uword kEndSimulatingPC = -2; | 145 static const uword kEndSimulatingPC = -2; |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 } | 275 } |
| 271 | 276 |
| 272 friend class SimulatorDebugger; | 277 friend class SimulatorDebugger; |
| 273 friend class SimulatorSetjmpBuffer; | 278 friend class SimulatorSetjmpBuffer; |
| 274 DISALLOW_COPY_AND_ASSIGN(Simulator); | 279 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 275 }; | 280 }; |
| 276 | 281 |
| 277 } // namespace dart | 282 } // namespace dart |
| 278 | 283 |
| 279 #endif // RUNTIME_VM_SIMULATOR_ARM_H_ | 284 #endif // RUNTIME_VM_SIMULATOR_ARM_H_ |
| OLD | NEW |