| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 int32_t parameter3, | 71 int32_t parameter3, |
| 72 int32_t parameter4); | 72 int32_t parameter4); |
| 73 | 73 |
| 74 // Implementation of atomic compare and exchange in the same synchronization | 74 // Implementation of atomic compare and exchange in the same synchronization |
| 75 // domain as other synchronization primitive instructions (e.g. ldrex, strex). | 75 // domain as other synchronization primitive instructions (e.g. ldrex, strex). |
| 76 static uword CompareExchange(uword* address, | 76 static uword CompareExchange(uword* address, |
| 77 uword compare_value, | 77 uword compare_value, |
| 78 uword new_value); | 78 uword new_value); |
| 79 | 79 |
| 80 // Runtime call support. | 80 // Runtime call support. |
| 81 static uword RedirectExternalReference(void* function, | 81 static uword RedirectExternalReference(uword function, |
| 82 uint32_t argument_count); | 82 uint32_t argument_count); |
| 83 | 83 |
| 84 void Longjmp(int32_t pc, int32_t sp, int32_t fp, const Instance& object); | 84 void Longjmp(int32_t pc, int32_t sp, int32_t fp, const Instance& object); |
| 85 | 85 |
| 86 private: | 86 private: |
| 87 // Known bad pc value to ensure that the simulator does not execute | 87 // Known bad pc value to ensure that the simulator does not execute |
| 88 // without being properly setup. | 88 // without being properly setup. |
| 89 static const uword kBadLR = -1; | 89 static const uword kBadLR = -1; |
| 90 // A pc value used to signal the simulator to stop execution. Generally | 90 // A pc value used to signal the simulator to stop execution. Generally |
| 91 // the lr is set to this value on transition from native C code to | 91 // the lr is set to this value on transition from native C code to |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 friend class SimulatorDebugger; | 222 friend class SimulatorDebugger; |
| 223 friend class SimulatorSetjmpBuffer; | 223 friend class SimulatorSetjmpBuffer; |
| 224 DISALLOW_COPY_AND_ASSIGN(Simulator); | 224 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 } // namespace dart | 227 } // namespace dart |
| 228 | 228 |
| 229 #endif // VM_SIMULATOR_ARM_H_ | 229 #endif // VM_SIMULATOR_ARM_H_ |
| OLD | NEW |