OLD | NEW |
1 | 1 |
2 // Copyright 2012 the V8 project authors. All rights reserved. | 2 // Copyright 2012 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include <limits.h> // For LONG_MIN, LONG_MAX. | 6 #include <limits.h> // For LONG_MIN, LONG_MAX. |
7 | 7 |
8 #if V8_TARGET_ARCH_MIPS | 8 #if V8_TARGET_ARCH_MIPS |
9 | 9 |
10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" |
(...skipping 5761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 Register reg5, | 5772 Register reg5, |
5773 Register reg6) { | 5773 Register reg6) { |
5774 RegList regs = 0; | 5774 RegList regs = 0; |
5775 if (reg1.is_valid()) regs |= reg1.bit(); | 5775 if (reg1.is_valid()) regs |= reg1.bit(); |
5776 if (reg2.is_valid()) regs |= reg2.bit(); | 5776 if (reg2.is_valid()) regs |= reg2.bit(); |
5777 if (reg3.is_valid()) regs |= reg3.bit(); | 5777 if (reg3.is_valid()) regs |= reg3.bit(); |
5778 if (reg4.is_valid()) regs |= reg4.bit(); | 5778 if (reg4.is_valid()) regs |= reg4.bit(); |
5779 if (reg5.is_valid()) regs |= reg5.bit(); | 5779 if (reg5.is_valid()) regs |= reg5.bit(); |
5780 if (reg6.is_valid()) regs |= reg6.bit(); | 5780 if (reg6.is_valid()) regs |= reg6.bit(); |
5781 | 5781 |
5782 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 5782 const RegisterConfiguration* config = |
| 5783 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
5783 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { | 5784 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { |
5784 int code = config->GetAllocatableGeneralCode(i); | 5785 int code = config->GetAllocatableGeneralCode(i); |
5785 Register candidate = Register::from_code(code); | 5786 Register candidate = Register::from_code(code); |
5786 if (regs & candidate.bit()) continue; | 5787 if (regs & candidate.bit()) continue; |
5787 return candidate; | 5788 return candidate; |
5788 } | 5789 } |
5789 UNREACHABLE(); | 5790 UNREACHABLE(); |
5790 return no_reg; | 5791 return no_reg; |
5791 } | 5792 } |
5792 | 5793 |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5929 if (mag.shift > 0) sra(result, result, mag.shift); | 5930 if (mag.shift > 0) sra(result, result, mag.shift); |
5930 srl(at, dividend, 31); | 5931 srl(at, dividend, 31); |
5931 Addu(result, result, Operand(at)); | 5932 Addu(result, result, Operand(at)); |
5932 } | 5933 } |
5933 | 5934 |
5934 | 5935 |
5935 } // namespace internal | 5936 } // namespace internal |
5936 } // namespace v8 | 5937 } // namespace v8 |
5937 | 5938 |
5938 #endif // V8_TARGET_ARCH_MIPS | 5939 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |