OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { | 637 for (int i = 0; i < XMMRegister::kNumAllocatableRegisters; ++i) { |
638 XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i); | 638 XMMRegister xmm_reg = XMMRegister::FromAllocationIndex(i); |
639 int offset = i * kDoubleSize; | 639 int offset = i * kDoubleSize; |
640 __ movsd(Operand(rsp, offset), xmm_reg); | 640 __ movsd(Operand(rsp, offset), xmm_reg); |
641 } | 641 } |
642 | 642 |
643 // We push all registers onto the stack, even though we do not need | 643 // We push all registers onto the stack, even though we do not need |
644 // to restore all later. | 644 // to restore all later. |
645 for (int i = 0; i < kNumberOfRegisters; i++) { | 645 for (int i = 0; i < kNumberOfRegisters; i++) { |
646 Register r = Register::toRegister(i); | 646 Register r = Register::from_code(i); |
647 __ push(r); | 647 __ push(r); |
648 } | 648 } |
649 | 649 |
650 const int kSavedRegistersAreaSize = kNumberOfRegisters * kPointerSize + | 650 const int kSavedRegistersAreaSize = kNumberOfRegisters * kPointerSize + |
651 kDoubleRegsSize; | 651 kDoubleRegsSize; |
652 | 652 |
653 // When calling new_deoptimizer_function we need to pass the last argument | 653 // When calling new_deoptimizer_function we need to pass the last argument |
654 // on the stack on windows and in r8 on linux. The remaining arguments are | 654 // on the stack on windows and in r8 on linux. The remaining arguments are |
655 // all passed in registers (different ones on linux and windows though). | 655 // all passed in registers (different ones on linux and windows though). |
656 | 656 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 __ push(Operand(rbx, FrameDescription::continuation_offset())); | 794 __ push(Operand(rbx, FrameDescription::continuation_offset())); |
795 | 795 |
796 // Push the registers from the last output frame. | 796 // Push the registers from the last output frame. |
797 for (int i = 0; i < kNumberOfRegisters; i++) { | 797 for (int i = 0; i < kNumberOfRegisters; i++) { |
798 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); | 798 int offset = (i * kPointerSize) + FrameDescription::registers_offset(); |
799 __ push(Operand(rbx, offset)); | 799 __ push(Operand(rbx, offset)); |
800 } | 800 } |
801 | 801 |
802 // Restore the registers from the stack. | 802 // Restore the registers from the stack. |
803 for (int i = kNumberOfRegisters - 1; i >= 0 ; i--) { | 803 for (int i = kNumberOfRegisters - 1; i >= 0 ; i--) { |
804 Register r = Register::toRegister(i); | 804 Register r = Register::from_code(i); |
805 // Do not restore rsp, simply pop the value into the next register | 805 // Do not restore rsp, simply pop the value into the next register |
806 // and overwrite this afterwards. | 806 // and overwrite this afterwards. |
807 if (r.is(rsp)) { | 807 if (r.is(rsp)) { |
808 ASSERT(i > 0); | 808 ASSERT(i > 0); |
809 r = Register::toRegister(i - 1); | 809 r = Register::from_code(i - 1); |
810 } | 810 } |
811 __ pop(r); | 811 __ pop(r); |
812 } | 812 } |
813 | 813 |
814 // Set up the roots register. | 814 // Set up the roots register. |
815 __ InitializeRootRegister(); | 815 __ InitializeRootRegister(); |
816 __ InitializeSmiConstantRegister(); | 816 __ InitializeSmiConstantRegister(); |
817 | 817 |
818 // Return to the continuation point. | 818 // Return to the continuation point. |
819 __ ret(0); | 819 __ ret(0); |
(...skipping 12 matching lines...) Expand all Loading... |
832 } | 832 } |
833 __ bind(&done); | 833 __ bind(&done); |
834 } | 834 } |
835 | 835 |
836 #undef __ | 836 #undef __ |
837 | 837 |
838 | 838 |
839 } } // namespace v8::internal | 839 } } // namespace v8::internal |
840 | 840 |
841 #endif // V8_TARGET_ARCH_X64 | 841 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |