OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 #include "src/base/division-by-constant.h" | 9 #include "src/base/division-by-constant.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 6029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6040 Register reg5, | 6040 Register reg5, |
6041 Register reg6) { | 6041 Register reg6) { |
6042 RegList regs = 0; | 6042 RegList regs = 0; |
6043 if (reg1.is_valid()) regs |= reg1.bit(); | 6043 if (reg1.is_valid()) regs |= reg1.bit(); |
6044 if (reg2.is_valid()) regs |= reg2.bit(); | 6044 if (reg2.is_valid()) regs |= reg2.bit(); |
6045 if (reg3.is_valid()) regs |= reg3.bit(); | 6045 if (reg3.is_valid()) regs |= reg3.bit(); |
6046 if (reg4.is_valid()) regs |= reg4.bit(); | 6046 if (reg4.is_valid()) regs |= reg4.bit(); |
6047 if (reg5.is_valid()) regs |= reg5.bit(); | 6047 if (reg5.is_valid()) regs |= reg5.bit(); |
6048 if (reg6.is_valid()) regs |= reg6.bit(); | 6048 if (reg6.is_valid()) regs |= reg6.bit(); |
6049 | 6049 |
6050 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 6050 const RegisterConfiguration* config = |
| 6051 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
6051 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { | 6052 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { |
6052 int code = config->GetAllocatableGeneralCode(i); | 6053 int code = config->GetAllocatableGeneralCode(i); |
6053 Register candidate = Register::from_code(code); | 6054 Register candidate = Register::from_code(code); |
6054 if (regs & candidate.bit()) continue; | 6055 if (regs & candidate.bit()) continue; |
6055 return candidate; | 6056 return candidate; |
6056 } | 6057 } |
6057 UNREACHABLE(); | 6058 UNREACHABLE(); |
6058 return no_reg; | 6059 return no_reg; |
6059 } | 6060 } |
6060 | 6061 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6196 if (mag.shift > 0) sra(result, result, mag.shift); | 6197 if (mag.shift > 0) sra(result, result, mag.shift); |
6197 srl(at, dividend, 31); | 6198 srl(at, dividend, 31); |
6198 Addu(result, result, Operand(at)); | 6199 Addu(result, result, Operand(at)); |
6199 } | 6200 } |
6200 | 6201 |
6201 | 6202 |
6202 } // namespace internal | 6203 } // namespace internal |
6203 } // namespace v8 | 6204 } // namespace v8 |
6204 | 6205 |
6205 #endif // V8_TARGET_ARCH_MIPS64 | 6206 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |