| 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 // Accessor to the internal simulator stack area. | 191 // Accessor to the internal simulator stack area. |
| 192 uintptr_t StackLimit() const; | 192 uintptr_t StackLimit() const; |
| 193 | 193 |
| 194 // Executes MIPS instructions until the PC reaches end_sim_pc. | 194 // Executes MIPS instructions until the PC reaches end_sim_pc. |
| 195 void Execute(); | 195 void Execute(); |
| 196 | 196 |
| 197 // Call on program start. | 197 // Call on program start. |
| 198 static void Initialize(Isolate* isolate); | 198 static void Initialize(Isolate* isolate); |
| 199 | 199 |
| 200 static void TearDown(HashMap* i_cache, Redirection* first); |
| 201 |
| 200 // V8 generally calls into generated JS code with 5 parameters and into | 202 // V8 generally calls into generated JS code with 5 parameters and into |
| 201 // generated RegExp code with 7 parameters. This is a convenience function, | 203 // generated RegExp code with 7 parameters. This is a convenience function, |
| 202 // which sets up the simulator state and grabs the result on return. | 204 // which sets up the simulator state and grabs the result on return. |
| 203 int32_t Call(byte* entry, int argument_count, ...); | 205 int32_t Call(byte* entry, int argument_count, ...); |
| 204 // Alternative: call a 2-argument double function. | 206 // Alternative: call a 2-argument double function. |
| 205 double CallFP(byte* entry, double d0, double d1); | 207 double CallFP(byte* entry, double d0, double d1); |
| 206 | 208 |
| 207 // Push an address onto the JS stack. | 209 // Push an address onto the JS stack. |
| 208 uintptr_t PushAddress(uintptr_t address); | 210 uintptr_t PushAddress(uintptr_t address); |
| 209 | 211 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 457 | 459 |
| 458 static inline void UnregisterCTryCatch() { | 460 static inline void UnregisterCTryCatch() { |
| 459 Simulator::current(Isolate::Current())->PopAddress(); | 461 Simulator::current(Isolate::Current())->PopAddress(); |
| 460 } | 462 } |
| 461 }; | 463 }; |
| 462 | 464 |
| 463 } } // namespace v8::internal | 465 } } // namespace v8::internal |
| 464 | 466 |
| 465 #endif // !defined(USE_SIMULATOR) | 467 #endif // !defined(USE_SIMULATOR) |
| 466 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 468 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
| OLD | NEW |