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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 | 81 |
82 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator | 82 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator |
83 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the | 83 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the |
84 // native stack. | 84 // native stack. |
85 uword top_exit_frame_info() const { return top_exit_frame_info_; } | 85 uword top_exit_frame_info() const { return top_exit_frame_info_; } |
86 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } | 86 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } |
87 | 87 |
88 // Call on program start. | 88 // Call on program start. |
89 static void InitOnce(); | 89 static void InitOnce(); |
90 | 90 |
91 // Dart generally calls into generated code with 5 parameters. This is a | 91 // Dart generally calls into generated code with 4 parameters. This is a |
92 // convenience function, which sets up the simulator state and grabs the | 92 // convenience function, which sets up the simulator state and grabs the |
93 // result on return. When fp_return is true the return value is the D0 | 93 // result on return. When fp_return is true the return value is the D0 |
94 // floating point register. Otherwise, the return value is R1:R0. | 94 // floating point register. Otherwise, the return value is R1:R0. |
95 // If fp_args is true, the parameters0-3 are placed in S0-3. Otherwise, they | 95 // If fp_args is true, the parameters0-3 are placed in S0-3. Otherwise, they |
96 // are placed in R0-3. | 96 // are placed in R0-3. |
97 int64_t Call(int32_t entry, | 97 int64_t Call(int32_t entry, |
98 int32_t parameter0, | 98 int32_t parameter0, |
99 int32_t parameter1, | 99 int32_t parameter1, |
100 int32_t parameter2, | 100 int32_t parameter2, |
101 int32_t parameter3, | 101 int32_t parameter3, |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 } | 274 } |
275 | 275 |
276 friend class SimulatorDebugger; | 276 friend class SimulatorDebugger; |
277 friend class SimulatorSetjmpBuffer; | 277 friend class SimulatorSetjmpBuffer; |
278 DISALLOW_COPY_AND_ASSIGN(Simulator); | 278 DISALLOW_COPY_AND_ASSIGN(Simulator); |
279 }; | 279 }; |
280 | 280 |
281 } // namespace dart | 281 } // namespace dart |
282 | 282 |
283 #endif // VM_SIMULATOR_ARM_H_ | 283 #endif // VM_SIMULATOR_ARM_H_ |
OLD | NEW |