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 2067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 } | 2078 } |
2079 break; | 2079 break; |
2080 case MFLO: | 2080 case MFLO: |
2081 *alu_out = get_register(LO); | 2081 *alu_out = get_register(LO); |
2082 break; | 2082 break; |
2083 case MULT: // MULT == D_MUL_MUH. | 2083 case MULT: // MULT == D_MUL_MUH. |
2084 // TODO(plind) - Unify MULT/DMULT with single set of 64-bit HI/Lo | 2084 // TODO(plind) - Unify MULT/DMULT with single set of 64-bit HI/Lo |
2085 // regs. | 2085 // regs. |
2086 // TODO(plind) - make the 32-bit MULT ops conform to spec regarding | 2086 // TODO(plind) - make the 32-bit MULT ops conform to spec regarding |
2087 // checking of 32-bit input values, and un-define operations of HW. | 2087 // checking of 32-bit input values, and un-define operations of HW. |
2088 *i64hilo = static_cast<int64_t>((int32_t)rs) * | 2088 *i64hilo = rs * rt; |
2089 static_cast<int64_t>((int32_t)rt); | |
2090 break; | 2089 break; |
2091 case MULTU: | 2090 case MULTU: |
2092 *u64hilo = static_cast<uint64_t>(rs_u) * static_cast<uint64_t>(rt_u); | 2091 *u64hilo = static_cast<uint64_t>(rs_u) * static_cast<uint64_t>(rt_u); |
2093 break; | 2092 break; |
2094 case DMULT: // DMULT == D_MUL_MUH. | 2093 case DMULT: // DMULT == D_MUL_MUH. |
2095 if (kArchVariant != kMips64r6) { | 2094 if (kArchVariant != kMips64r6) { |
2096 *i128resultH = MultiplyHighSigned(rs, rt); | 2095 *i128resultH = MultiplyHighSigned(rs, rt); |
2097 *i128resultL = rs * rt; | 2096 *i128resultL = rs * rt; |
2098 } else { | 2097 } else { |
2099 switch (instr->SaValue()) { | 2098 switch (instr->SaValue()) { |
(...skipping 1337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3437 } | 3436 } |
3438 | 3437 |
3439 | 3438 |
3440 #undef UNSUPPORTED | 3439 #undef UNSUPPORTED |
3441 | 3440 |
3442 } } // namespace v8::internal | 3441 } } // namespace v8::internal |
3443 | 3442 |
3444 #endif // USE_SIMULATOR | 3443 #endif // USE_SIMULATOR |
3445 | 3444 |
3446 #endif // V8_TARGET_ARCH_MIPS64 | 3445 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |