OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 MIPS instructions if we are not generating a native | 6 // Declares a Simulator for MIPS instructions if we are not generating a native |
7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation | 7 // MIPS binary. This Simulator allows us to run and debug MIPS code generation |
8 // on regular desktop machines. | 8 // on 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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 | 222 |
223 // Accessor to the internal simulator stack area. | 223 // Accessor to the internal simulator stack area. |
224 uintptr_t StackLimit() const; | 224 uintptr_t StackLimit() const; |
225 | 225 |
226 // Executes MIPS instructions until the PC reaches end_sim_pc. | 226 // Executes MIPS instructions until the PC reaches end_sim_pc. |
227 void Execute(); | 227 void Execute(); |
228 | 228 |
229 // Call on program start. | 229 // Call on program start. |
230 static void Initialize(Isolate* isolate); | 230 static void Initialize(Isolate* isolate); |
231 | 231 |
| 232 static void TearDown(HashMap* i_cache, Redirection* first); |
| 233 |
232 // V8 generally calls into generated JS code with 5 parameters and into | 234 // V8 generally calls into generated JS code with 5 parameters and into |
233 // generated RegExp code with 7 parameters. This is a convenience function, | 235 // generated RegExp code with 7 parameters. This is a convenience function, |
234 // which sets up the simulator state and grabs the result on return. | 236 // which sets up the simulator state and grabs the result on return. |
235 int64_t Call(byte* entry, int argument_count, ...); | 237 int64_t Call(byte* entry, int argument_count, ...); |
236 // Alternative: call a 2-argument double function. | 238 // Alternative: call a 2-argument double function. |
237 double CallFP(byte* entry, double d0, double d1); | 239 double CallFP(byte* entry, double d0, double d1); |
238 | 240 |
239 // Push an address onto the JS stack. | 241 // Push an address onto the JS stack. |
240 uintptr_t PushAddress(uintptr_t address); | 242 uintptr_t PushAddress(uintptr_t address); |
241 | 243 |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 | 518 |
517 static inline void UnregisterCTryCatch() { | 519 static inline void UnregisterCTryCatch() { |
518 Simulator::current(Isolate::Current())->PopAddress(); | 520 Simulator::current(Isolate::Current())->PopAddress(); |
519 } | 521 } |
520 }; | 522 }; |
521 | 523 |
522 } } // namespace v8::internal | 524 } } // namespace v8::internal |
523 | 525 |
524 #endif // !defined(USE_SIMULATOR) | 526 #endif // !defined(USE_SIMULATOR) |
525 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 527 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
OLD | NEW |