OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 ARM64 instructions if we are not generating a native | 5 // Declares a Simulator for ARM64 instructions if we are not generating a native |
6 // ARM64 binary. This Simulator allows us to run and debug ARM64 code generation | 6 // ARM64 binary. This Simulator allows us to run and debug ARM64 code generation |
7 // on regular desktop machines. | 7 // on 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 ARM64 HW platform. | 10 // on a ARM64 HW platform. |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 kRuntimeCall, | 96 kRuntimeCall, |
97 kLeafRuntimeCall, | 97 kLeafRuntimeCall, |
98 kLeafFloatRuntimeCall, | 98 kLeafFloatRuntimeCall, |
99 kBootstrapNativeCall, | 99 kBootstrapNativeCall, |
100 kNativeCall | 100 kNativeCall |
101 }; | 101 }; |
102 static uword RedirectExternalReference(uword function, | 102 static uword RedirectExternalReference(uword function, |
103 CallKind call_kind, | 103 CallKind call_kind, |
104 int argument_count); | 104 int argument_count); |
105 | 105 |
| 106 static uword FunctionForRedirect(uword redirect); |
| 107 |
106 void Longjmp(uword pc, | 108 void Longjmp(uword pc, |
107 uword sp, | 109 uword sp, |
108 uword fp, | 110 uword fp, |
109 RawObject* raw_exception, | 111 RawObject* raw_exception, |
110 RawObject* raw_stacktrace, | 112 RawObject* raw_stacktrace, |
111 Isolate* isolate); | 113 Isolate* isolate); |
112 | 114 |
113 private: | 115 private: |
114 // Known bad pc value to ensure that the simulator does not execute | 116 // Known bad pc value to ensure that the simulator does not execute |
115 // without being properly setup. | 117 // without being properly setup. |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 } | 223 } |
222 | 224 |
223 friend class SimulatorDebugger; | 225 friend class SimulatorDebugger; |
224 friend class SimulatorSetjmpBuffer; | 226 friend class SimulatorSetjmpBuffer; |
225 DISALLOW_COPY_AND_ASSIGN(Simulator); | 227 DISALLOW_COPY_AND_ASSIGN(Simulator); |
226 }; | 228 }; |
227 | 229 |
228 } // namespace dart | 230 } // namespace dart |
229 | 231 |
230 #endif // VM_SIMULATOR_ARM64_H_ | 232 #endif // VM_SIMULATOR_ARM64_H_ |
OLD | NEW |