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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 kRuntimeCall, | 105 kRuntimeCall, |
106 kLeafRuntimeCall, | 106 kLeafRuntimeCall, |
107 kLeafFloatRuntimeCall, | 107 kLeafFloatRuntimeCall, |
108 kBootstrapNativeCall, | 108 kBootstrapNativeCall, |
109 kNativeCall | 109 kNativeCall |
110 }; | 110 }; |
111 static uword RedirectExternalReference(uword function, | 111 static uword RedirectExternalReference(uword function, |
112 CallKind call_kind, | 112 CallKind call_kind, |
113 int argument_count); | 113 int argument_count); |
114 | 114 |
| 115 static uword FunctionForRedirect(uword redirect); |
| 116 |
115 void Longjmp(uword pc, | 117 void Longjmp(uword pc, |
116 uword sp, | 118 uword sp, |
117 uword fp, | 119 uword fp, |
118 RawObject* raw_exception, | 120 RawObject* raw_exception, |
119 RawObject* raw_stacktrace, | 121 RawObject* raw_stacktrace, |
120 Isolate* isolate); | 122 Isolate* isolate); |
121 | 123 |
122 private: | 124 private: |
123 // Known bad pc value to ensure that the simulator does not execute | 125 // Known bad pc value to ensure that the simulator does not execute |
124 // without being properly setup. | 126 // without being properly setup. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 } | 264 } |
263 | 265 |
264 friend class SimulatorDebugger; | 266 friend class SimulatorDebugger; |
265 friend class SimulatorSetjmpBuffer; | 267 friend class SimulatorSetjmpBuffer; |
266 DISALLOW_COPY_AND_ASSIGN(Simulator); | 268 DISALLOW_COPY_AND_ASSIGN(Simulator); |
267 }; | 269 }; |
268 | 270 |
269 } // namespace dart | 271 } // namespace dart |
270 | 272 |
271 #endif // VM_SIMULATOR_ARM_H_ | 273 #endif // VM_SIMULATOR_ARM_H_ |
OLD | NEW |