Mercurial > hg > graal-jvmci-8
comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 13451:02f27ecb4f3a
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 18 Dec 2013 00:00:24 +0100 |
parents | 6b0fd0964b87 fca8f4799229 |
children | f6c04e69cf75 |
comparison
equal
deleted
inserted
replaced
13371:4db09b7304da | 13451:02f27ecb4f3a |
---|---|
3540 __ movl(rcx, Address(rdi, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes())); | 3540 __ movl(rcx, Address(rdi, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes())); |
3541 __ addptr(rsp, rcx); | 3541 __ addptr(rsp, rcx); |
3542 | 3542 |
3543 // rsp should be pointing at the return address to the caller (3) | 3543 // rsp should be pointing at the return address to the caller (3) |
3544 | 3544 |
3545 // Pick up the initial fp we should save | |
3546 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) | |
3547 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); | |
3548 | |
3545 // Stack bang to make sure there's enough room for these interpreter frames. | 3549 // Stack bang to make sure there's enough room for these interpreter frames. |
3546 if (UseStackBanging) { | 3550 if (UseStackBanging) { |
3547 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); | 3551 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); |
3548 __ bang_stack_size(rbx, rcx); | 3552 __ bang_stack_size(rbx, rcx); |
3549 } | 3553 } |
3557 // Load address of array of frame sizes into rsi | 3561 // Load address of array of frame sizes into rsi |
3558 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes())); | 3562 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes())); |
3559 | 3563 |
3560 // Load counter into rdx | 3564 // Load counter into rdx |
3561 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes())); | 3565 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes())); |
3562 | |
3563 // Pick up the initial fp we should save | |
3564 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); | |
3565 | 3566 |
3566 // Now adjust the caller's stack to make up for the extra locals | 3567 // Now adjust the caller's stack to make up for the extra locals |
3567 // but record the original sp so that we can save it in the skeletal interpreter | 3568 // but record the original sp so that we can save it in the skeletal interpreter |
3568 // frame and the stack walking of interpreter_sender will get the unextended sp | 3569 // frame and the stack walking of interpreter_sender will get the unextended sp |
3569 // value and not the "real" sp value. | 3570 // value and not the "real" sp value. |
3736 size_of_deoptimized_frame_offset_in_bytes())); | 3737 size_of_deoptimized_frame_offset_in_bytes())); |
3737 __ addptr(rsp, rcx); | 3738 __ addptr(rsp, rcx); |
3738 | 3739 |
3739 // rsp should be pointing at the return address to the caller (3) | 3740 // rsp should be pointing at the return address to the caller (3) |
3740 | 3741 |
3742 // Pick up the initial fp we should save | |
3743 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) | |
3744 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); | |
3745 | |
3741 // Stack bang to make sure there's enough room for these interpreter frames. | 3746 // Stack bang to make sure there's enough room for these interpreter frames. |
3742 if (UseStackBanging) { | 3747 if (UseStackBanging) { |
3743 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); | 3748 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); |
3744 __ bang_stack_size(rbx, rcx); | 3749 __ bang_stack_size(rbx, rcx); |
3745 } | 3750 } |
3746 | 3751 |
3747 // Load address of array of frame pcs into rcx (address*) | 3752 // Load address of array of frame pcs into rcx (address*) |
3748 __ movptr(rcx, | 3753 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes())); |
3749 Address(rdi, | |
3750 Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes())); | |
3751 | 3754 |
3752 // Trash the return pc | 3755 // Trash the return pc |
3753 __ addptr(rsp, wordSize); | 3756 __ addptr(rsp, wordSize); |
3754 | 3757 |
3755 // Load address of array of frame sizes into rsi (intptr_t*) | 3758 // Load address of array of frame sizes into rsi (intptr_t*) |
3756 __ movptr(rsi, Address(rdi, | 3759 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock:: frame_sizes_offset_in_bytes())); |
3757 Deoptimization::UnrollBlock:: | |
3758 frame_sizes_offset_in_bytes())); | |
3759 | 3760 |
3760 // Counter | 3761 // Counter |
3761 __ movl(rdx, Address(rdi, | 3762 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock:: number_of_frames_offset_in_bytes())); // (int) |
3762 Deoptimization::UnrollBlock:: | |
3763 number_of_frames_offset_in_bytes())); // (int) | |
3764 | |
3765 // Pick up the initial fp we should save | |
3766 __ movptr(rbp, | |
3767 Address(rdi, | |
3768 Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); | |
3769 | 3763 |
3770 // Now adjust the caller's stack to make up for the extra locals but | 3764 // Now adjust the caller's stack to make up for the extra locals but |
3771 // record the original sp so that we can save it in the skeletal | 3765 // record the original sp so that we can save it in the skeletal |
3772 // interpreter frame and the stack walking of interpreter_sender | 3766 // interpreter frame and the stack walking of interpreter_sender |
3773 // will get the unextended sp value and not the "real" sp value. | 3767 // will get the unextended sp value and not the "real" sp value. |
3774 | 3768 |
3775 const Register sender_sp = r8; | 3769 const Register sender_sp = r8; |
3776 | 3770 |
3777 __ mov(sender_sp, rsp); | 3771 __ mov(sender_sp, rsp); |
3778 __ movl(rbx, Address(rdi, | 3772 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock:: caller_adjustment_offset_in_bytes())); // (int) |
3779 Deoptimization::UnrollBlock:: | |
3780 caller_adjustment_offset_in_bytes())); // (int) | |
3781 __ subptr(rsp, rbx); | 3773 __ subptr(rsp, rbx); |
3782 | 3774 |
3783 // Push interpreter frames in a loop | 3775 // Push interpreter frames in a loop |
3784 Label loop; | 3776 Label loop; |
3785 __ bind(loop); | 3777 __ bind(loop); |