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 7068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7079 Register reg5, | 7079 Register reg5, |
7080 Register reg6) { | 7080 Register reg6) { |
7081 RegList regs = 0; | 7081 RegList regs = 0; |
7082 if (reg1.is_valid()) regs |= reg1.bit(); | 7082 if (reg1.is_valid()) regs |= reg1.bit(); |
7083 if (reg2.is_valid()) regs |= reg2.bit(); | 7083 if (reg2.is_valid()) regs |= reg2.bit(); |
7084 if (reg3.is_valid()) regs |= reg3.bit(); | 7084 if (reg3.is_valid()) regs |= reg3.bit(); |
7085 if (reg4.is_valid()) regs |= reg4.bit(); | 7085 if (reg4.is_valid()) regs |= reg4.bit(); |
7086 if (reg5.is_valid()) regs |= reg5.bit(); | 7086 if (reg5.is_valid()) regs |= reg5.bit(); |
7087 if (reg6.is_valid()) regs |= reg6.bit(); | 7087 if (reg6.is_valid()) regs |= reg6.bit(); |
7088 | 7088 |
7089 const RegisterConfiguration* config = | 7089 const RegisterConfiguration* config = RegisterConfiguration::Crankshaft(); |
7090 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); | |
7091 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { | 7090 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { |
7092 int code = config->GetAllocatableGeneralCode(i); | 7091 int code = config->GetAllocatableGeneralCode(i); |
7093 Register candidate = Register::from_code(code); | 7092 Register candidate = Register::from_code(code); |
7094 if (regs & candidate.bit()) continue; | 7093 if (regs & candidate.bit()) continue; |
7095 return candidate; | 7094 return candidate; |
7096 } | 7095 } |
7097 UNREACHABLE(); | 7096 UNREACHABLE(); |
7098 return no_reg; | 7097 return no_reg; |
7099 } | 7098 } |
7100 | 7099 |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7218 if (mag.shift > 0) sra(result, result, mag.shift); | 7217 if (mag.shift > 0) sra(result, result, mag.shift); |
7219 srl(at, dividend, 31); | 7218 srl(at, dividend, 31); |
7220 Addu(result, result, Operand(at)); | 7219 Addu(result, result, Operand(at)); |
7221 } | 7220 } |
7222 | 7221 |
7223 | 7222 |
7224 } // namespace internal | 7223 } // namespace internal |
7225 } // namespace v8 | 7224 } // namespace v8 |
7226 | 7225 |
7227 #endif // V8_TARGET_ARCH_MIPS64 | 7226 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |