| 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 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 EmbeddedVector<char, 128> trace_buf_; | 293 EmbeddedVector<char, 128> trace_buf_; |
| 294 | 294 |
| 295 // Operations depending on endianness. | 295 // Operations depending on endianness. |
| 296 // Get Double Higher / Lower word. | 296 // Get Double Higher / Lower word. |
| 297 inline int32_t GetDoubleHIW(double* addr); | 297 inline int32_t GetDoubleHIW(double* addr); |
| 298 inline int32_t GetDoubleLOW(double* addr); | 298 inline int32_t GetDoubleLOW(double* addr); |
| 299 // Set Double Higher / Lower word. | 299 // Set Double Higher / Lower word. |
| 300 inline int32_t SetDoubleHIW(double* addr); | 300 inline int32_t SetDoubleHIW(double* addr); |
| 301 inline int32_t SetDoubleLOW(double* addr); | 301 inline int32_t SetDoubleLOW(double* addr); |
| 302 | 302 |
| 303 // Min/Max template functions for Double and Single arguments. |
| 304 enum class IsMin : int { kMin = 0, kMax = 1 }; |
| 305 |
| 306 template <typename T> |
| 307 bool FPUProcessNaNsAndZeros(T a, T b, IsMin min, T& result); |
| 308 |
| 309 template <typename T> |
| 310 T FPUMin(T a, T b); |
| 311 |
| 312 template <typename T> |
| 313 T FPUMax(T a, T b); |
| 314 |
| 315 template <typename T> |
| 316 T FPUMinA(T a, T b); |
| 317 |
| 318 template <typename T> |
| 319 T FPUMaxA(T a, T b); |
| 320 |
| 303 // Executing is handled based on the instruction type. | 321 // Executing is handled based on the instruction type. |
| 304 void DecodeTypeRegister(Instruction* instr); | 322 void DecodeTypeRegister(Instruction* instr); |
| 305 | 323 |
| 306 // Functions called from DecodeTypeRegister. | 324 // Functions called from DecodeTypeRegister. |
| 307 void DecodeTypeRegisterCOP1(); | 325 void DecodeTypeRegisterCOP1(); |
| 308 | 326 |
| 309 void DecodeTypeRegisterCOP1X(); | 327 void DecodeTypeRegisterCOP1X(); |
| 310 | 328 |
| 311 void DecodeTypeRegisterSPECIAL(); | 329 void DecodeTypeRegisterSPECIAL(); |
| 312 | 330 |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 static inline void UnregisterCTryCatch(Isolate* isolate) { | 523 static inline void UnregisterCTryCatch(Isolate* isolate) { |
| 506 Simulator::current(isolate)->PopAddress(); | 524 Simulator::current(isolate)->PopAddress(); |
| 507 } | 525 } |
| 508 }; | 526 }; |
| 509 | 527 |
| 510 } // namespace internal | 528 } // namespace internal |
| 511 } // namespace v8 | 529 } // namespace v8 |
| 512 | 530 |
| 513 #endif // !defined(USE_SIMULATOR) | 531 #endif // !defined(USE_SIMULATOR) |
| 514 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 532 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
| OLD | NEW |