| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 int64_t parameter2, | 95 int64_t parameter2, |
| 96 int64_t parameter3, | 96 int64_t parameter3, |
| 97 bool fp_return = false, | 97 bool fp_return = false, |
| 98 bool fp_args = false); | 98 bool fp_args = false); |
| 99 | 99 |
| 100 // Implementation of atomic compare and exchange in the same synchronization | 100 // Implementation of atomic compare and exchange in the same synchronization |
| 101 // domain as other synchronization primitive instructions (e.g. ldrex, strex). | 101 // domain as other synchronization primitive instructions (e.g. ldrex, strex). |
| 102 static uword CompareExchange(uword* address, | 102 static uword CompareExchange(uword* address, |
| 103 uword compare_value, | 103 uword compare_value, |
| 104 uword new_value); | 104 uword new_value); |
| 105 static uint32_t CompareExchangeUint32(uint32_t* address, |
| 106 uint32_t compare_value, |
| 107 uint32_t new_value); |
| 105 | 108 |
| 106 // Runtime and native call support. | 109 // Runtime and native call support. |
| 107 enum CallKind { | 110 enum CallKind { |
| 108 kRuntimeCall, | 111 kRuntimeCall, |
| 109 kLeafRuntimeCall, | 112 kLeafRuntimeCall, |
| 110 kLeafFloatRuntimeCall, | 113 kLeafFloatRuntimeCall, |
| 111 kBootstrapNativeCall, | 114 kBootstrapNativeCall, |
| 112 kNativeCall | 115 kNativeCall |
| 113 }; | 116 }; |
| 114 static uword RedirectExternalReference(uword function, | 117 static uword RedirectExternalReference(uword function, |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 272 } |
| 270 | 273 |
| 271 friend class SimulatorDebugger; | 274 friend class SimulatorDebugger; |
| 272 friend class SimulatorSetjmpBuffer; | 275 friend class SimulatorSetjmpBuffer; |
| 273 DISALLOW_COPY_AND_ASSIGN(Simulator); | 276 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 274 }; | 277 }; |
| 275 | 278 |
| 276 } // namespace dart | 279 } // namespace dart |
| 277 | 280 |
| 278 #endif // VM_SIMULATOR_ARM64_H_ | 281 #endif // VM_SIMULATOR_ARM64_H_ |
| OLD | NEW |