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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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. | 75 // Accessor to the instruction counter. |
76 intptr_t get_icount() const { return icount_; } | 76 uint64_t get_icount() const { return icount_; } |
77 | 77 |
78 // 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 |
79 // 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 |
80 // native stack. | 80 // native stack. |
81 uword top_exit_frame_info() const { return top_exit_frame_info_; } | 81 uword top_exit_frame_info() const { return top_exit_frame_info_; } |
82 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; } |
83 | 83 |
84 // Call on program start. | 84 // Call on program start. |
85 static void InitOnce(); | 85 static void InitOnce(); |
86 | 86 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 simd_value_t qregisters_[kNumberOfQRegisters]; | 149 simd_value_t qregisters_[kNumberOfQRegisters]; |
150 }; | 150 }; |
151 bool fp_n_flag_; | 151 bool fp_n_flag_; |
152 bool fp_z_flag_; | 152 bool fp_z_flag_; |
153 bool fp_c_flag_; | 153 bool fp_c_flag_; |
154 bool fp_v_flag_; | 154 bool fp_v_flag_; |
155 | 155 |
156 // Simulator support. | 156 // Simulator support. |
157 char* stack_; | 157 char* stack_; |
158 bool pc_modified_; | 158 bool pc_modified_; |
159 intptr_t icount_; | 159 uint64_t icount_; |
160 static int32_t flag_stop_sim_at_; | 160 static int32_t flag_stop_sim_at_; |
161 SimulatorSetjmpBuffer* last_setjmp_buffer_; | 161 SimulatorSetjmpBuffer* last_setjmp_buffer_; |
162 uword top_exit_frame_info_; | 162 uword top_exit_frame_info_; |
163 | 163 |
164 // Registered breakpoints. | 164 // Registered breakpoints. |
165 Instr* break_pc_; | 165 Instr* break_pc_; |
166 int32_t break_instr_; | 166 int32_t break_instr_; |
167 | 167 |
168 // Illegal memory access support. | 168 // Illegal memory access support. |
169 static bool IsIllegalAddress(uword addr) { | 169 static bool IsIllegalAddress(uword addr) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 } | 271 } |
272 | 272 |
273 friend class SimulatorDebugger; | 273 friend class SimulatorDebugger; |
274 friend class SimulatorSetjmpBuffer; | 274 friend class SimulatorSetjmpBuffer; |
275 DISALLOW_COPY_AND_ASSIGN(Simulator); | 275 DISALLOW_COPY_AND_ASSIGN(Simulator); |
276 }; | 276 }; |
277 | 277 |
278 } // namespace dart | 278 } // namespace dart |
279 | 279 |
280 #endif // VM_SIMULATOR_ARM_H_ | 280 #endif // VM_SIMULATOR_ARM_H_ |
OLD | NEW |