OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 PPC instructions if we are not generating a native | 6 // Declares a Simulator for PPC instructions if we are not generating a native |
7 // PPC binary. This Simulator allows us to run and debug PPC code generation on | 7 // PPC binary. This Simulator allows us to run and debug PPC 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 | 205 |
206 // Accessor to the internal simulator stack area. | 206 // Accessor to the internal simulator stack area. |
207 uintptr_t StackLimit() const; | 207 uintptr_t StackLimit() const; |
208 | 208 |
209 // Executes PPC instructions until the PC reaches end_sim_pc. | 209 // Executes PPC instructions until the PC reaches end_sim_pc. |
210 void Execute(); | 210 void Execute(); |
211 | 211 |
212 // Call on program start. | 212 // Call on program start. |
213 static void Initialize(Isolate* isolate); | 213 static void Initialize(Isolate* isolate); |
214 | 214 |
| 215 static void TearDown(HashMap* i_cache, Redirection* first); |
| 216 |
215 // V8 generally calls into generated JS code with 5 parameters and into | 217 // V8 generally calls into generated JS code with 5 parameters and into |
216 // generated RegExp code with 7 parameters. This is a convenience function, | 218 // generated RegExp code with 7 parameters. This is a convenience function, |
217 // which sets up the simulator state and grabs the result on return. | 219 // which sets up the simulator state and grabs the result on return. |
218 intptr_t Call(byte* entry, int argument_count, ...); | 220 intptr_t Call(byte* entry, int argument_count, ...); |
219 // Alternative: call a 2-argument double function. | 221 // Alternative: call a 2-argument double function. |
220 void CallFP(byte* entry, double d0, double d1); | 222 void CallFP(byte* entry, double d0, double d1); |
221 int32_t CallFPReturnsInt(byte* entry, double d0, double d1); | 223 int32_t CallFPReturnsInt(byte* entry, double d0, double d1); |
222 double CallFPReturnsDouble(byte* entry, double d0, double d1); | 224 double CallFPReturnsDouble(byte* entry, double d0, double d1); |
223 | 225 |
224 // Push an address onto the JS stack. | 226 // Push an address onto the JS stack. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 | 418 |
417 static inline void UnregisterCTryCatch() { | 419 static inline void UnregisterCTryCatch() { |
418 Simulator::current(Isolate::Current())->PopAddress(); | 420 Simulator::current(Isolate::Current())->PopAddress(); |
419 } | 421 } |
420 }; | 422 }; |
421 } | 423 } |
422 } // namespace v8::internal | 424 } // namespace v8::internal |
423 | 425 |
424 #endif // !defined(USE_SIMULATOR) | 426 #endif // !defined(USE_SIMULATOR) |
425 #endif // V8_PPC_SIMULATOR_PPC_H_ | 427 #endif // V8_PPC_SIMULATOR_PPC_H_ |
OLD | NEW |