| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 AssertStackConsistency(); | 753 AssertStackConsistency(); |
| 754 if (csp.Is(StackPointer())) { | 754 if (csp.Is(StackPointer())) { |
| 755 // If the current stack pointer is csp, then it must be aligned to 16 bytes | 755 // If the current stack pointer is csp, then it must be aligned to 16 bytes |
| 756 // on entry and the total size of the specified registers must also be a | 756 // on entry and the total size of the specified registers must also be a |
| 757 // multiple of 16 bytes. | 757 // multiple of 16 bytes. |
| 758 ASSERT((count * size) % 16 == 0); | 758 ASSERT((count * size) % 16 == 0); |
| 759 } | 759 } |
| 760 } | 760 } |
| 761 | 761 |
| 762 | 762 |
| 763 void MacroAssembler::Poke(const Register& src, const Operand& offset) { | 763 void MacroAssembler::Poke(const CPURegister& src, const Operand& offset) { |
| 764 if (offset.IsImmediate()) { | 764 if (offset.IsImmediate()) { |
| 765 ASSERT(offset.immediate() >= 0); | 765 ASSERT(offset.immediate() >= 0); |
| 766 } else if (emit_debug_code()) { | 766 } else if (emit_debug_code()) { |
| 767 Cmp(xzr, offset); | 767 Cmp(xzr, offset); |
| 768 Check(le, "Poke offset is negative."); | 768 Check(le, "Poke offset is negative."); |
| 769 } | 769 } |
| 770 | 770 |
| 771 Str(src, MemOperand(StackPointer(), offset)); | 771 Str(src, MemOperand(StackPointer(), offset)); |
| 772 } | 772 } |
| 773 | 773 |
| 774 | 774 |
| 775 void MacroAssembler::Peek(const Register& dst, const Operand& offset) { | 775 void MacroAssembler::Peek(const CPURegister& dst, const Operand& offset) { |
| 776 if (offset.IsImmediate()) { | 776 if (offset.IsImmediate()) { |
| 777 ASSERT(offset.immediate() >= 0); | 777 ASSERT(offset.immediate() >= 0); |
| 778 } else if (emit_debug_code()) { | 778 } else if (emit_debug_code()) { |
| 779 Cmp(xzr, offset); | 779 Cmp(xzr, offset); |
| 780 Check(le, "Peek offset is negative."); | 780 Check(le, "Peek offset is negative."); |
| 781 } | 781 } |
| 782 | 782 |
| 783 Ldr(dst, MemOperand(StackPointer(), offset)); | 783 Ldr(dst, MemOperand(StackPointer(), offset)); |
| 784 } | 784 } |
| 785 | 785 |
| (...skipping 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2656 int offset = ExitFrameConstants::kLastExitFrameField; | 2656 int offset = ExitFrameConstants::kLastExitFrameField; |
| 2657 while (!saved_fp_regs.IsEmpty()) { | 2657 while (!saved_fp_regs.IsEmpty()) { |
| 2658 const CPURegister& dst0 = saved_fp_regs.PopHighestIndex(); | 2658 const CPURegister& dst0 = saved_fp_regs.PopHighestIndex(); |
| 2659 const CPURegister& dst1 = saved_fp_regs.PopHighestIndex(); | 2659 const CPURegister& dst1 = saved_fp_regs.PopHighestIndex(); |
| 2660 offset -= 2 * kDRegSizeInBytes; | 2660 offset -= 2 * kDRegSizeInBytes; |
| 2661 Ldp(dst1, dst0, MemOperand(fp, offset)); | 2661 Ldp(dst1, dst0, MemOperand(fp, offset)); |
| 2662 } | 2662 } |
| 2663 } | 2663 } |
| 2664 | 2664 |
| 2665 | 2665 |
| 2666 // TODO(jbramley): Check that we're handling FP correctly [GOOGJSE-33]. | 2666 // TODO(jbramley): Check that we're handling the frame pointer correctly. |
| 2667 void MacroAssembler::EnterExitFrame(bool save_doubles, | 2667 void MacroAssembler::EnterExitFrame(bool save_doubles, |
| 2668 const Register& scratch, | 2668 const Register& scratch, |
| 2669 int extra_space) { | 2669 int extra_space) { |
| 2670 ASSERT(jssp.Is(StackPointer())); | 2670 ASSERT(jssp.Is(StackPointer())); |
| 2671 | 2671 |
| 2672 // Set up the new stack frame. | 2672 // Set up the new stack frame. |
| 2673 Mov(scratch, Operand(CodeObject())); | 2673 Mov(scratch, Operand(CodeObject())); |
| 2674 Push(lr, fp); | 2674 Push(lr, fp); |
| 2675 Mov(fp, StackPointer()); | 2675 Mov(fp, StackPointer()); |
| 2676 Push(xzr, scratch); | 2676 Push(xzr, scratch); |
| (...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4708 } | 4708 } |
| 4709 } | 4709 } |
| 4710 | 4710 |
| 4711 | 4711 |
| 4712 #undef __ | 4712 #undef __ |
| 4713 | 4713 |
| 4714 | 4714 |
| 4715 } } // namespace v8::internal | 4715 } } // namespace v8::internal |
| 4716 | 4716 |
| 4717 #endif // V8_TARGET_ARCH_A64 | 4717 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |