| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 int32_t parameter2, | 114 int32_t parameter2, |
| 115 int32_t parameter3, | 115 int32_t parameter3, |
| 116 bool fp_return = false, | 116 bool fp_return = false, |
| 117 bool fp_args = false); | 117 bool fp_args = false); |
| 118 | 118 |
| 119 // Implementation of atomic compare and exchange in the same synchronization | 119 // Implementation of atomic compare and exchange in the same synchronization |
| 120 // domain as other synchronization primitive instructions (e.g. ldrex, strex). | 120 // domain as other synchronization primitive instructions (e.g. ldrex, strex). |
| 121 static uword CompareExchange(uword* address, | 121 static uword CompareExchange(uword* address, |
| 122 uword compare_value, | 122 uword compare_value, |
| 123 uword new_value); | 123 uword new_value); |
| 124 static uint32_t CompareExchangeUint32(uint32_t* address, |
| 125 uint32_t compare_value, |
| 126 uint32_t new_value); |
| 124 | 127 |
| 125 // Runtime and native call support. | 128 // Runtime and native call support. |
| 126 enum CallKind { | 129 enum CallKind { |
| 127 kRuntimeCall, | 130 kRuntimeCall, |
| 128 kLeafRuntimeCall, | 131 kLeafRuntimeCall, |
| 129 kLeafFloatRuntimeCall, | 132 kLeafFloatRuntimeCall, |
| 130 kBootstrapNativeCall, | 133 kBootstrapNativeCall, |
| 131 kNativeCall | 134 kNativeCall |
| 132 }; | 135 }; |
| 133 static uword RedirectExternalReference(uword function, | 136 static uword RedirectExternalReference(uword function, |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 } | 257 } |
| 255 | 258 |
| 256 friend class SimulatorDebugger; | 259 friend class SimulatorDebugger; |
| 257 friend class SimulatorSetjmpBuffer; | 260 friend class SimulatorSetjmpBuffer; |
| 258 DISALLOW_COPY_AND_ASSIGN(Simulator); | 261 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 259 }; | 262 }; |
| 260 | 263 |
| 261 } // namespace dart | 264 } // namespace dart |
| 262 | 265 |
| 263 #endif // VM_SIMULATOR_MIPS_H_ | 266 #endif // VM_SIMULATOR_MIPS_H_ |
| OLD | NEW |