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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 none, | 486 none, |
487 kIntegerOverflow, | 487 kIntegerOverflow, |
488 kIntegerUnderflow, | 488 kIntegerUnderflow, |
489 kDivideByZero, | 489 kDivideByZero, |
490 kNumExceptions | 490 kNumExceptions |
491 }; | 491 }; |
492 | 492 |
493 // Exceptions. | 493 // Exceptions. |
494 void SignalException(Exception e); | 494 void SignalException(Exception e); |
495 | 495 |
496 // Runtime call support. | 496 // Runtime call support. Uses the isolate in a thread-safe way. |
497 static void* RedirectExternalReference(Isolate* isolate, | 497 static void* RedirectExternalReference(Isolate* isolate, |
498 void* external_function, | 498 void* external_function, |
499 ExternalReference::Type type); | 499 ExternalReference::Type type); |
500 | 500 |
501 // Handle arguments and return value for runtime FP functions. | 501 // Handle arguments and return value for runtime FP functions. |
502 void GetFpArgs(double* x, double* y, int32_t* z); | 502 void GetFpArgs(double* x, double* y, int32_t* z); |
503 void SetFpResult(const double& result); | 503 void SetFpResult(const double& result); |
504 | 504 |
505 void CallInternal(byte* entry); | 505 void CallInternal(byte* entry); |
506 | 506 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 static inline void UnregisterCTryCatch(Isolate* isolate) { | 582 static inline void UnregisterCTryCatch(Isolate* isolate) { |
583 Simulator::current(isolate)->PopAddress(); | 583 Simulator::current(isolate)->PopAddress(); |
584 } | 584 } |
585 }; | 585 }; |
586 | 586 |
587 } // namespace internal | 587 } // namespace internal |
588 } // namespace v8 | 588 } // namespace v8 |
589 | 589 |
590 #endif // !defined(USE_SIMULATOR) | 590 #endif // !defined(USE_SIMULATOR) |
591 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 591 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
OLD | NEW |