| 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 | 78 |
| 79 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator | 79 // The isolate's top_exit_frame_info refers to a Dart frame in the simulator |
| 80 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the | 80 // stack. The simulator's top_exit_frame_info refers to a C++ frame in the |
| 81 // native stack. | 81 // native stack. |
| 82 uword top_exit_frame_info() const { return top_exit_frame_info_; } | 82 uword top_exit_frame_info() const { return top_exit_frame_info_; } |
| 83 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } | 83 void set_top_exit_frame_info(uword value) { top_exit_frame_info_ = value; } |
| 84 | 84 |
| 85 // Call on program start. | 85 // Call on program start. |
| 86 static void InitOnce(); | 86 static void InitOnce(); |
| 87 | 87 |
| 88 // Dart generally calls into generated code with 5 parameters. This is a | 88 // Dart generally calls into generated code with 4 parameters. This is a |
| 89 // convenience function, which sets up the simulator state and grabs the | 89 // convenience function, which sets up the simulator state and grabs the |
| 90 // result on return. The return value is R0. The parameters are placed in | 90 // result on return. The return value is R0. The parameters are placed in |
| 91 // R0-3. | 91 // R0-3. |
| 92 int64_t Call(int64_t entry, | 92 int64_t Call(int64_t entry, |
| 93 int64_t parameter0, | 93 int64_t parameter0, |
| 94 int64_t parameter1, | 94 int64_t parameter1, |
| 95 int64_t parameter2, | 95 int64_t parameter2, |
| 96 int64_t parameter3, | 96 int64_t parameter3, |
| 97 bool fp_return = false, | 97 bool fp_return = false, |
| 98 bool fp_args = false); | 98 bool fp_args = false); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 } | 269 } |
| 270 | 270 |
| 271 friend class SimulatorDebugger; | 271 friend class SimulatorDebugger; |
| 272 friend class SimulatorSetjmpBuffer; | 272 friend class SimulatorSetjmpBuffer; |
| 273 DISALLOW_COPY_AND_ASSIGN(Simulator); | 273 DISALLOW_COPY_AND_ASSIGN(Simulator); |
| 274 }; | 274 }; |
| 275 | 275 |
| 276 } // namespace dart | 276 } // namespace dart |
| 277 | 277 |
| 278 #endif // VM_SIMULATOR_ARM64_H_ | 278 #endif // VM_SIMULATOR_ARM64_H_ |
| OLD | NEW |