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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 int32_t get_vregisters(VRegister reg, int idx) const; | 59 int32_t get_vregisters(VRegister reg, int idx) const; |
60 void set_vregisters(VRegister reg, int idx, int32_t value); | 60 void set_vregisters(VRegister reg, int idx, int32_t value); |
61 | 61 |
62 int64_t get_vregisterd(VRegister reg, int idx) const; | 62 int64_t get_vregisterd(VRegister reg, int idx) const; |
63 void set_vregisterd(VRegister reg, int idx, int64_t value); | 63 void set_vregisterd(VRegister reg, int idx, int64_t value); |
64 | 64 |
65 void get_vregister(VRegister reg, simd_value_t* value) const; | 65 void get_vregister(VRegister reg, simd_value_t* value) const; |
66 void set_vregister(VRegister reg, const simd_value_t& value); | 66 void set_vregister(VRegister reg, const simd_value_t& value); |
67 | 67 |
| 68 int64_t get_sp() const { |
| 69 return get_register(SPREG); |
| 70 } |
| 71 |
68 int64_t get_pc() const; | 72 int64_t get_pc() const; |
69 int64_t get_last_pc() const; | 73 int64_t get_last_pc() const; |
70 void set_pc(int64_t pc); | 74 void set_pc(int64_t pc); |
71 | 75 |
72 // Accessors to the internal simulator stack base and top. | 76 // Accessors to the internal simulator stack base and top. |
73 uword StackBase() const { return reinterpret_cast<uword>(stack_); } | 77 uword StackBase() const { return reinterpret_cast<uword>(stack_); } |
74 uword StackTop() const; | 78 uword StackTop() const; |
75 | 79 |
76 // Accessor to the instruction counter. | 80 // Accessor to the instruction counter. |
77 uint64_t get_icount() const { return icount_; } | 81 uint64_t get_icount() const { return icount_; } |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 } | 276 } |
273 | 277 |
274 friend class SimulatorDebugger; | 278 friend class SimulatorDebugger; |
275 friend class SimulatorSetjmpBuffer; | 279 friend class SimulatorSetjmpBuffer; |
276 DISALLOW_COPY_AND_ASSIGN(Simulator); | 280 DISALLOW_COPY_AND_ASSIGN(Simulator); |
277 }; | 281 }; |
278 | 282 |
279 } // namespace dart | 283 } // namespace dart |
280 | 284 |
281 #endif // VM_SIMULATOR_ARM64_H_ | 285 #endif // VM_SIMULATOR_ARM64_H_ |
OLD | NEW |