OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 // Declares a Simulator for ARM instructions if we are not generating a native | 6 // Declares a Simulator for ARM instructions if we are not generating a native |
7 // ARM binary. This Simulator allows us to run and debug ARM code generation on | 7 // ARM binary. This Simulator allows us to run and debug ARM code generation on |
8 // regular desktop machines. | 8 // regular desktop machines. |
9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, | 9 // V8 calls into generated code by "calling" the CALL_GENERATED_CODE macro, |
10 // which will start execution in the Simulator or forwards to the real entry | 10 // which will start execution in the Simulator or forwards to the real entry |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 | 187 |
188 // Accessor to the internal simulator stack area. | 188 // Accessor to the internal simulator stack area. |
189 uintptr_t StackLimit() const; | 189 uintptr_t StackLimit() const; |
190 | 190 |
191 // Executes ARM instructions until the PC reaches end_sim_pc. | 191 // Executes ARM instructions until the PC reaches end_sim_pc. |
192 void Execute(); | 192 void Execute(); |
193 | 193 |
194 // Call on program start. | 194 // Call on program start. |
195 static void Initialize(Isolate* isolate); | 195 static void Initialize(Isolate* isolate); |
196 | 196 |
| 197 static void TearDown(HashMap* i_cache, Redirection* first); |
| 198 |
197 // V8 generally calls into generated JS code with 5 parameters and into | 199 // V8 generally calls into generated JS code with 5 parameters and into |
198 // generated RegExp code with 7 parameters. This is a convenience function, | 200 // generated RegExp code with 7 parameters. This is a convenience function, |
199 // which sets up the simulator state and grabs the result on return. | 201 // which sets up the simulator state and grabs the result on return. |
200 int32_t Call(byte* entry, int argument_count, ...); | 202 int32_t Call(byte* entry, int argument_count, ...); |
201 // Alternative: call a 2-argument double function. | 203 // Alternative: call a 2-argument double function. |
202 void CallFP(byte* entry, double d0, double d1); | 204 void CallFP(byte* entry, double d0, double d1); |
203 int32_t CallFPReturnsInt(byte* entry, double d0, double d1); | 205 int32_t CallFPReturnsInt(byte* entry, double d0, double d1); |
204 double CallFPReturnsDouble(byte* entry, double d0, double d1); | 206 double CallFPReturnsDouble(byte* entry, double d0, double d1); |
205 | 207 |
206 // Push an address onto the JS stack. | 208 // Push an address onto the JS stack. |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 | 457 |
456 static inline void UnregisterCTryCatch() { | 458 static inline void UnregisterCTryCatch() { |
457 Simulator::current(Isolate::Current())->PopAddress(); | 459 Simulator::current(Isolate::Current())->PopAddress(); |
458 } | 460 } |
459 }; | 461 }; |
460 | 462 |
461 } } // namespace v8::internal | 463 } } // namespace v8::internal |
462 | 464 |
463 #endif // !defined(USE_SIMULATOR) | 465 #endif // !defined(USE_SIMULATOR) |
464 #endif // V8_ARM_SIMULATOR_ARM_H_ | 466 #endif // V8_ARM_SIMULATOR_ARM_H_ |
OLD | NEW |