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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 // the FPU registers, use the _bits calls to avoid gcc taking liberties with | 65 // the FPU registers, use the _bits calls to avoid gcc taking liberties with |
66 // integers that map to such things as NaN floating point values. | 66 // integers that map to such things as NaN floating point values. |
67 void set_sregister_bits(SRegister reg, int32_t value); | 67 void set_sregister_bits(SRegister reg, int32_t value); |
68 int32_t get_sregister_bits(SRegister reg) const; | 68 int32_t get_sregister_bits(SRegister reg) const; |
69 void set_dregister_bits(DRegister reg, int64_t value); | 69 void set_dregister_bits(DRegister reg, int64_t value); |
70 int64_t get_dregister_bits(DRegister reg) const; | 70 int64_t get_dregister_bits(DRegister reg) const; |
71 | 71 |
72 // Accessor to the internal simulator stack top. | 72 // Accessor to the internal simulator stack top. |
73 uword StackTop() const; | 73 uword StackTop() const; |
74 | 74 |
| 75 // Accessor to the instruction counter. |
| 76 intptr_t get_icount() const { return icount_; } |
| 77 |
75 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator | 78 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator |
76 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the | 79 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the |
77 // native stack. | 80 // native stack. |
78 uword top_exit_frame_info() const { return top_exit_frame_info_; } | 81 uword top_exit_frame_info() const { return top_exit_frame_info_; } |
79 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } | 82 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } |
80 | 83 |
81 // Call on program start. | 84 // Call on program start. |
82 static void InitOnce(); | 85 static void InitOnce(); |
83 | 86 |
84 // Dart generally calls into generated code with 5 parameters. This is a | 87 // Dart generally calls into generated code with 5 parameters. This is a |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 } | 268 } |
266 | 269 |
267 friend class SimulatorDebugger; | 270 friend class SimulatorDebugger; |
268 friend class SimulatorSetjmpBuffer; | 271 friend class SimulatorSetjmpBuffer; |
269 DISALLOW_COPY_AND_ASSIGN(Simulator); | 272 DISALLOW_COPY_AND_ASSIGN(Simulator); |
270 }; | 273 }; |
271 | 274 |
272 } // namespace dart | 275 } // namespace dart |
273 | 276 |
274 #endif // VM_SIMULATOR_ARM_H_ | 277 #endif // VM_SIMULATOR_ARM_H_ |
OLD | NEW |