diff options
Diffstat (limited to 'deps/v8/src/mips/simulator-mips.h')
-rw-r--r-- | deps/v8/src/mips/simulator-mips.h | 45 |
1 files changed, 29 insertions, 16 deletions
diff --git a/deps/v8/src/mips/simulator-mips.h b/deps/v8/src/mips/simulator-mips.h index 624d4acf80..8efe0bba9c 100644 --- a/deps/v8/src/mips/simulator-mips.h +++ b/deps/v8/src/mips/simulator-mips.h @@ -23,7 +23,7 @@ namespace v8 { namespace internal { // When running without a simulator we call the entry directly. -#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ +#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ entry(p0, p1, p2, p3, p4) typedef int (*mips_regexp_matcher)(String*, int, const byte*, const byte*, @@ -34,9 +34,10 @@ typedef int (*mips_regexp_matcher)(String*, int, const byte*, const byte*, // should act as a function matching the type arm_regexp_matcher. // The fifth argument is a dummy that reserves the space used for // the return address added by the ExitFrame in native calls. -#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ - (FUNCTION_CAST<mips_regexp_matcher>(entry)( \ - p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8)) +#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) \ + (FUNCTION_CAST<mips_regexp_matcher>(entry)(p0, p1, p2, p3, NULL, p4, p5, p6, \ + p7, p8)) // The stack limit beyond which we will throw stack overflow errors in // generated code. Because generated code on mips uses the C stack, we @@ -48,11 +49,13 @@ class SimulatorStack : public v8::internal::AllStatic { return c_limit; } - static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { + static inline uintptr_t RegisterCTryCatch(Isolate* isolate, + uintptr_t try_catch_address) { + USE(isolate); return try_catch_address; } - static inline void UnregisterCTryCatch() { } + static inline void UnregisterCTryCatch(Isolate* isolate) { USE(isolate); } }; } // namespace internal @@ -168,6 +171,12 @@ class Simulator { void set_fpu_register_hi_word(int fpureg, int32_t value); void set_fpu_register_float(int fpureg, float value); void set_fpu_register_double(int fpureg, double value); + void set_fpu_register_invalid_result64(float original, float rounded); + void set_fpu_register_invalid_result(float original, float rounded); + void set_fpu_register_word_invalid_result(float original, float rounded); + void set_fpu_register_invalid_result64(double original, double rounded); + void set_fpu_register_invalid_result(double original, double rounded); + void set_fpu_register_word_invalid_result(double original, double rounded); int64_t get_fpu_register(int fpureg) const; int32_t get_fpu_register_word(int fpureg) const; int32_t get_fpu_register_signed_word(int fpureg) const; @@ -335,6 +344,7 @@ class Simulator { inline int32_t ft_reg() const { return currentInstr_->FtValue(); } inline int32_t fd_reg() const { return currentInstr_->FdValue(); } inline int32_t sa() const { return currentInstr_->SaValue(); } + inline int32_t lsa_sa() const { return currentInstr_->LsaSaValue(); } inline void SetResult(int32_t rd_reg, int32_t alu_out) { set_register(rd_reg, alu_out); @@ -408,7 +418,8 @@ class Simulator { void SignalException(Exception e); // Runtime call support. - static void* RedirectExternalReference(void* external_function, + static void* RedirectExternalReference(Isolate* isolate, + void* external_function, ExternalReference::Type type); // Handle arguments and return value for runtime FP functions. @@ -464,13 +475,14 @@ class Simulator { // When running with the simulator transition into simulated execution at this // point. -#define CALL_GENERATED_CODE(entry, p0, p1, p2, p3, p4) \ - reinterpret_cast<Object*>(Simulator::current(Isolate::Current())->Call( \ +#define CALL_GENERATED_CODE(isolate, entry, p0, p1, p2, p3, p4) \ + reinterpret_cast<Object*>(Simulator::current(isolate)->Call( \ FUNCTION_ADDR(entry), 5, p0, p1, p2, p3, p4)) -#define CALL_GENERATED_REGEXP_CODE(entry, p0, p1, p2, p3, p4, p5, p6, p7, p8) \ - Simulator::current(Isolate::Current())->Call( \ - entry, 10, p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8) +#define CALL_GENERATED_REGEXP_CODE(isolate, entry, p0, p1, p2, p3, p4, p5, p6, \ + p7, p8) \ + Simulator::current(isolate) \ + ->Call(entry, 10, p0, p1, p2, p3, NULL, p4, p5, p6, p7, p8) // The simulator has its own stack. Thus it has a different stack limit from @@ -484,13 +496,14 @@ class SimulatorStack : public v8::internal::AllStatic { return Simulator::current(isolate)->StackLimit(c_limit); } - static inline uintptr_t RegisterCTryCatch(uintptr_t try_catch_address) { - Simulator* sim = Simulator::current(Isolate::Current()); + static inline uintptr_t RegisterCTryCatch(Isolate* isolate, + uintptr_t try_catch_address) { + Simulator* sim = Simulator::current(isolate); return sim->PushAddress(try_catch_address); } - static inline void UnregisterCTryCatch() { - Simulator::current(Isolate::Current())->PopAddress(); + static inline void UnregisterCTryCatch(Isolate* isolate) { + Simulator::current(isolate)->PopAddress(); } }; |