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_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 | 753 |
754 MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) { | 754 MemOperand MacroAssembler::SafepointRegisterSlot(Register reg) { |
755 return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize); | 755 return MemOperand(sp, SafepointRegisterStackIndex(reg.code()) * kPointerSize); |
756 } | 756 } |
757 | 757 |
758 | 758 |
759 MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) { | 759 MemOperand MacroAssembler::SafepointRegistersAndDoublesSlot(Register reg) { |
760 // Number of d-regs not known at snapshot time. | 760 // Number of d-regs not known at snapshot time. |
761 DCHECK(!serializer_enabled()); | 761 DCHECK(!serializer_enabled()); |
762 // General purpose registers are pushed last on the stack. | 762 // General purpose registers are pushed last on the stack. |
763 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 763 const RegisterConfiguration* config = |
| 764 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
764 int doubles_size = config->num_allocatable_double_registers() * kDoubleSize; | 765 int doubles_size = config->num_allocatable_double_registers() * kDoubleSize; |
765 int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize; | 766 int register_offset = SafepointRegisterStackIndex(reg.code()) * kPointerSize; |
766 return MemOperand(sp, doubles_size + register_offset); | 767 return MemOperand(sp, doubles_size + register_offset); |
767 } | 768 } |
768 | 769 |
769 | 770 |
770 void MacroAssembler::Ldrd(Register dst1, Register dst2, | 771 void MacroAssembler::Ldrd(Register dst1, Register dst2, |
771 const MemOperand& src, Condition cond) { | 772 const MemOperand& src, Condition cond) { |
772 DCHECK(src.rm().is(no_reg)); | 773 DCHECK(src.rm().is(no_reg)); |
773 DCHECK(!dst1.is(lr)); // r14. | 774 DCHECK(!dst1.is(lr)); // r14. |
(...skipping 2799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3573 Register reg5, | 3574 Register reg5, |
3574 Register reg6) { | 3575 Register reg6) { |
3575 RegList regs = 0; | 3576 RegList regs = 0; |
3576 if (reg1.is_valid()) regs |= reg1.bit(); | 3577 if (reg1.is_valid()) regs |= reg1.bit(); |
3577 if (reg2.is_valid()) regs |= reg2.bit(); | 3578 if (reg2.is_valid()) regs |= reg2.bit(); |
3578 if (reg3.is_valid()) regs |= reg3.bit(); | 3579 if (reg3.is_valid()) regs |= reg3.bit(); |
3579 if (reg4.is_valid()) regs |= reg4.bit(); | 3580 if (reg4.is_valid()) regs |= reg4.bit(); |
3580 if (reg5.is_valid()) regs |= reg5.bit(); | 3581 if (reg5.is_valid()) regs |= reg5.bit(); |
3581 if (reg6.is_valid()) regs |= reg6.bit(); | 3582 if (reg6.is_valid()) regs |= reg6.bit(); |
3582 | 3583 |
3583 const RegisterConfiguration* config = RegisterConfiguration::ArchDefault(); | 3584 const RegisterConfiguration* config = |
| 3585 RegisterConfiguration::ArchDefault(RegisterConfiguration::CRANKSHAFT); |
3584 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { | 3586 for (int i = 0; i < config->num_allocatable_general_registers(); ++i) { |
3585 int code = config->GetAllocatableGeneralCode(i); | 3587 int code = config->GetAllocatableGeneralCode(i); |
3586 Register candidate = Register::from_code(code); | 3588 Register candidate = Register::from_code(code); |
3587 if (regs & candidate.bit()) continue; | 3589 if (regs & candidate.bit()) continue; |
3588 return candidate; | 3590 return candidate; |
3589 } | 3591 } |
3590 UNREACHABLE(); | 3592 UNREACHABLE(); |
3591 return no_reg; | 3593 return no_reg; |
3592 } | 3594 } |
3593 | 3595 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3721 } | 3723 } |
3722 } | 3724 } |
3723 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3725 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
3724 add(result, result, Operand(dividend, LSR, 31)); | 3726 add(result, result, Operand(dividend, LSR, 31)); |
3725 } | 3727 } |
3726 | 3728 |
3727 } // namespace internal | 3729 } // namespace internal |
3728 } // namespace v8 | 3730 } // namespace v8 |
3729 | 3731 |
3730 #endif // V8_TARGET_ARCH_ARM | 3732 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |