| 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 MIPS instructions if we are not generating a native | 5 // Declares a Simulator for MIPS instructions if we are not generating a native |
| 6 // MIPS binary. This Simulator allows us to run and debug MIPS code generation | 6 // MIPS binary. This Simulator allows us to run and debug MIPS 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 MIPS HW platform. | 10 // on a MIPS HW platform. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 kLeafFloatRuntimeCall, | 132 kLeafFloatRuntimeCall, |
| 133 kBootstrapNativeCall, | 133 kBootstrapNativeCall, |
| 134 kNativeCall | 134 kNativeCall |
| 135 }; | 135 }; |
| 136 static uword RedirectExternalReference(uword function, | 136 static uword RedirectExternalReference(uword function, |
| 137 CallKind call_kind, | 137 CallKind call_kind, |
| 138 int argument_count); | 138 int argument_count); |
| 139 | 139 |
| 140 static uword FunctionForRedirect(uword redirect); | 140 static uword FunctionForRedirect(uword redirect); |
| 141 | 141 |
| 142 void Longjmp(uword pc, | 142 void JumpToFrame(uword pc, uword sp, uword fp, Thread* thread); |
| 143 uword sp, | |
| 144 uword fp, | |
| 145 RawObject* raw_exception, | |
| 146 RawObject* raw_stacktrace, | |
| 147 Thread* thread); | |
| 148 | 143 |
| 149 private: | 144 private: |
| 150 // A pc value used to signal the simulator to stop execution. Generally | 145 // A pc value used to signal the simulator to stop execution. Generally |
| 151 // the ra is set to this value on transition from native C code to | 146 // the ra is set to this value on transition from native C code to |
| 152 // simulated execution, so that the simulator can "return" to the native | 147 // simulated execution, so that the simulator can "return" to the native |
| 153 // C code. | 148 // C code. |
| 154 static const uword kEndSimulatingPC = -1; | 149 static const uword kEndSimulatingPC = -1; |
| 155 | 150 |
| 156 // Special registers for the results of div, divu. | 151 // Special registers for the results of div, divu. |
| 157 int32_t hi_reg_; | 152 int32_t hi_reg_; |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 } | 248 } |
| 254 | 249 |
| 255 friend class SimulatorDebugger; | 250 friend class SimulatorDebugger; |
| 256 friend class SimulatorSetjmpBuffer; | 251 friend class SimulatorSetjmpBuffer; |
| 257 DISALLOW_COPY_AND_ASSIGN(Simulator); | 252 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 258 }; | 253 }; |
| 259 | 254 |
| 260 } // namespace dart | 255 } // namespace dart |
| 261 | 256 |
| 262 #endif // RUNTIME_VM_SIMULATOR_MIPS_H_ | 257 #endif // RUNTIME_VM_SIMULATOR_MIPS_H_ |
| OLD | NEW |