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