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 MIPS instructions if we are not generating a native | 5 // Declares a Simulator for MIPS instructions if we are not generating a native |
6 // MIPS binary. This Simulator allows us to run and debug MIPS code generation | 6 // MIPS binary. This Simulator allows us to run and debug MIPS 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 MIPS HW platform. | 10 // on a MIPS HW platform. |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator | 98 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator |
99 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the | 99 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the |
100 // native stack. | 100 // native stack. |
101 uword top_exit_frame_info() const { return top_exit_frame_info_; } | 101 uword top_exit_frame_info() const { return top_exit_frame_info_; } |
102 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } | 102 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } |
103 | 103 |
104 // Call on program start. | 104 // Call on program start. |
105 static void InitOnce(); | 105 static void InitOnce(); |
106 | 106 |
107 // Dart generally calls into generated code with 5 parameters. This is a | 107 // Dart generally calls into generated code with 4 parameters. This is a |
108 // convenience function, which sets up the simulator state and grabs the | 108 // convenience function, which sets up the simulator state and grabs the |
109 // result on return. When fp_return is true the return value is the D0 | 109 // result on return. When fp_return is true the return value is the D0 |
110 // floating point register. Otherwise, the return value is V1:V0. | 110 // floating point register. Otherwise, the return value is V1:V0. |
111 int64_t Call(int32_t entry, | 111 int64_t Call(int32_t entry, |
112 int32_t parameter0, | 112 int32_t parameter0, |
113 int32_t parameter1, | 113 int32_t parameter1, |
114 int32_t parameter2, | 114 int32_t parameter2, |
115 int32_t parameter3, | 115 int32_t parameter3, |
116 bool fp_return = false, | 116 bool fp_return = false, |
117 bool fp_args = false); | 117 bool fp_args = false); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 } | 254 } |
255 | 255 |
256 friend class SimulatorDebugger; | 256 friend class SimulatorDebugger; |
257 friend class SimulatorSetjmpBuffer; | 257 friend class SimulatorSetjmpBuffer; |
258 DISALLOW_COPY_AND_ASSIGN(Simulator); | 258 DISALLOW_COPY_AND_ASSIGN(Simulator); |
259 }; | 259 }; |
260 | 260 |
261 } // namespace dart | 261 } // namespace dart |
262 | 262 |
263 #endif // VM_SIMULATOR_MIPS_H_ | 263 #endif // VM_SIMULATOR_MIPS_H_ |
OLD | NEW |