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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 kNativeCall | 104 kNativeCall |
105 }; | 105 }; |
106 static uword RedirectExternalReference(uword function, | 106 static uword RedirectExternalReference(uword function, |
107 CallKind call_kind, | 107 CallKind call_kind, |
108 int argument_count); | 108 int argument_count); |
109 | 109 |
110 void Longjmp(uword pc, | 110 void Longjmp(uword pc, |
111 uword sp, | 111 uword sp, |
112 uword fp, | 112 uword fp, |
113 RawObject* raw_exception, | 113 RawObject* raw_exception, |
114 RawObject* raw_stacktrace); | 114 RawObject* raw_stacktrace, |
| 115 Isolate* isolate); |
115 | 116 |
116 private: | 117 private: |
117 // Known bad pc value to ensure that the simulator does not execute | 118 // Known bad pc value to ensure that the simulator does not execute |
118 // without being properly setup. | 119 // without being properly setup. |
119 static const uword kBadLR = -1; | 120 static const uword kBadLR = -1; |
120 // A pc value used to signal the simulator to stop execution. Generally | 121 // A pc value used to signal the simulator to stop execution. Generally |
121 // the lr is set to this value on transition from native C code to | 122 // the lr is set to this value on transition from native C code to |
122 // simulated execution, so that the simulator can "return" to the native | 123 // simulated execution, so that the simulator can "return" to the native |
123 // C code. | 124 // C code. |
124 static const uword kEndSimulatingPC = -2; | 125 static const uword kEndSimulatingPC = -2; |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 } | 229 } |
229 | 230 |
230 friend class SimulatorDebugger; | 231 friend class SimulatorDebugger; |
231 friend class SimulatorSetjmpBuffer; | 232 friend class SimulatorSetjmpBuffer; |
232 DISALLOW_COPY_AND_ASSIGN(Simulator); | 233 DISALLOW_COPY_AND_ASSIGN(Simulator); |
233 }; | 234 }; |
234 | 235 |
235 } // namespace dart | 236 } // namespace dart |
236 | 237 |
237 #endif // VM_SIMULATOR_ARM_H_ | 238 #endif // VM_SIMULATOR_ARM_H_ |
OLD | NEW |