| 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 #include <limits.h> | 5 #include <limits.h> |
| 6 #include <stdarg.h> | 6 #include <stdarg.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 2976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2987 } | 2987 } |
| 2988 | 2988 |
| 2989 | 2989 |
| 2990 void Simulator::DecodeTypeRegisterDRsType(Instruction* instr, | 2990 void Simulator::DecodeTypeRegisterDRsType(Instruction* instr, |
| 2991 const int32_t& fs_reg, | 2991 const int32_t& fs_reg, |
| 2992 const int32_t& ft_reg, | 2992 const int32_t& ft_reg, |
| 2993 const int32_t& fd_reg) { | 2993 const int32_t& fd_reg) { |
| 2994 double ft, fs, fd; | 2994 double ft, fs, fd; |
| 2995 uint32_t cc, fcsr_cc; | 2995 uint32_t cc, fcsr_cc; |
| 2996 fs = get_fpu_register_double(fs_reg); | 2996 fs = get_fpu_register_double(fs_reg); |
| 2997 if (instr->FunctionFieldRaw() != MOVF) { | 2997 ft = (instr->FunctionFieldRaw() != MOVF) ? get_fpu_register_double(ft_reg) |
| 2998 ft = get_fpu_register_double(ft_reg); | 2998 : 0.0; |
| 2999 } | |
| 3000 fd = get_fpu_register_double(fd_reg); | 2999 fd = get_fpu_register_double(fd_reg); |
| 3001 cc = instr->FCccValue(); | 3000 cc = instr->FCccValue(); |
| 3002 fcsr_cc = get_fcsr_condition_bit(cc); | 3001 fcsr_cc = get_fcsr_condition_bit(cc); |
| 3003 int64_t ft_int = bit_cast<int64_t>(ft); | 3002 int64_t ft_int = bit_cast<int64_t>(ft); |
| 3004 int64_t fd_int = bit_cast<int64_t>(fd); | 3003 int64_t fd_int = bit_cast<int64_t>(fd); |
| 3005 switch (instr->FunctionFieldRaw()) { | 3004 switch (instr->FunctionFieldRaw()) { |
| 3006 case RINT: { | 3005 case RINT: { |
| 3007 DCHECK(kArchVariant == kMips64r6); | 3006 DCHECK(kArchVariant == kMips64r6); |
| 3008 double result, temp, temp_result; | 3007 double result, temp, temp_result; |
| 3009 double upper = std::ceil(fs); | 3008 double upper = std::ceil(fs); |
| (...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4579 return address; | 4578 return address; |
| 4580 } | 4579 } |
| 4581 | 4580 |
| 4582 | 4581 |
| 4583 #undef UNSUPPORTED | 4582 #undef UNSUPPORTED |
| 4584 } } // namespace v8::internal | 4583 } } // namespace v8::internal |
| 4585 | 4584 |
| 4586 #endif // USE_SIMULATOR | 4585 #endif // USE_SIMULATOR |
| 4587 | 4586 |
| 4588 #endif // V8_TARGET_ARCH_MIPS64 | 4587 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |