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 | |
321 // Executing is handled based on the instruction type. | 303 // Executing is handled based on the instruction type. |
322 void DecodeTypeRegister(Instruction* instr); | 304 void DecodeTypeRegister(Instruction* instr); |
323 | 305 |
324 // Functions called from DecodeTypeRegister. | 306 // Functions called from DecodeTypeRegister. |
325 void DecodeTypeRegisterCOP1(); | 307 void DecodeTypeRegisterCOP1(); |
326 | 308 |
327 void DecodeTypeRegisterCOP1X(); | 309 void DecodeTypeRegisterCOP1X(); |
328 | 310 |
329 void DecodeTypeRegisterSPECIAL(); | 311 void DecodeTypeRegisterSPECIAL(); |
330 | 312 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 static inline void UnregisterCTryCatch(Isolate* isolate) { | 505 static inline void UnregisterCTryCatch(Isolate* isolate) { |
524 Simulator::current(isolate)->PopAddress(); | 506 Simulator::current(isolate)->PopAddress(); |
525 } | 507 } |
526 }; | 508 }; |
527 | 509 |
528 } // namespace internal | 510 } // namespace internal |
529 } // namespace v8 | 511 } // namespace v8 |
530 | 512 |
531 #endif // !defined(USE_SIMULATOR) | 513 #endif // !defined(USE_SIMULATOR) |
532 #endif // V8_MIPS_SIMULATOR_MIPS_H_ | 514 #endif // V8_MIPS_SIMULATOR_MIPS_H_ |
OLD | NEW |