comparison src/cpu/x86/vm/sharedRuntime_x86_64.cpp @ 14442:1174c8abbdb6

Merge
author kvn
date Thu, 05 Dec 2013 15:13:12 -0800
parents 6a936747b569 fca8f4799229
children abec000618bf
comparison
equal deleted inserted replaced
14441:e7cbc95179c4 14442:1174c8abbdb6
3471 __ movl(rcx, Address(rdi, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes())); 3471 __ movl(rcx, Address(rdi, Deoptimization::UnrollBlock::size_of_deoptimized_frame_offset_in_bytes()));
3472 __ addptr(rsp, rcx); 3472 __ addptr(rsp, rcx);
3473 3473
3474 // rsp should be pointing at the return address to the caller (3) 3474 // rsp should be pointing at the return address to the caller (3)
3475 3475
3476 // Pick up the initial fp we should save
3477 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
3478 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3479
3476 // Stack bang to make sure there's enough room for these interpreter frames. 3480 // Stack bang to make sure there's enough room for these interpreter frames.
3477 if (UseStackBanging) { 3481 if (UseStackBanging) {
3478 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); 3482 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3479 __ bang_stack_size(rbx, rcx); 3483 __ bang_stack_size(rbx, rcx);
3480 } 3484 }
3488 // Load address of array of frame sizes into rsi 3492 // Load address of array of frame sizes into rsi
3489 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes())); 3493 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock::frame_sizes_offset_in_bytes()));
3490 3494
3491 // Load counter into rdx 3495 // Load counter into rdx
3492 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes())); 3496 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
3493
3494 // Pick up the initial fp we should save
3495 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3496 3497
3497 // Now adjust the caller's stack to make up for the extra locals 3498 // Now adjust the caller's stack to make up for the extra locals
3498 // but record the original sp so that we can save it in the skeletal interpreter 3499 // but record the original sp so that we can save it in the skeletal interpreter
3499 // frame and the stack walking of interpreter_sender will get the unextended sp 3500 // frame and the stack walking of interpreter_sender will get the unextended sp
3500 // value and not the "real" sp value. 3501 // value and not the "real" sp value.
3663 size_of_deoptimized_frame_offset_in_bytes())); 3664 size_of_deoptimized_frame_offset_in_bytes()));
3664 __ addptr(rsp, rcx); 3665 __ addptr(rsp, rcx);
3665 3666
3666 // rsp should be pointing at the return address to the caller (3) 3667 // rsp should be pointing at the return address to the caller (3)
3667 3668
3669 // Pick up the initial fp we should save
3670 // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
3671 __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3672
3668 // Stack bang to make sure there's enough room for these interpreter frames. 3673 // Stack bang to make sure there's enough room for these interpreter frames.
3669 if (UseStackBanging) { 3674 if (UseStackBanging) {
3670 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); 3675 __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
3671 __ bang_stack_size(rbx, rcx); 3676 __ bang_stack_size(rbx, rcx);
3672 } 3677 }
3673 3678
3674 // Load address of array of frame pcs into rcx (address*) 3679 // Load address of array of frame pcs into rcx (address*)
3675 __ movptr(rcx, 3680 __ movptr(rcx, Address(rdi, Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3676 Address(rdi,
3677 Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
3678 3681
3679 // Trash the return pc 3682 // Trash the return pc
3680 __ addptr(rsp, wordSize); 3683 __ addptr(rsp, wordSize);
3681 3684
3682 // Load address of array of frame sizes into rsi (intptr_t*) 3685 // Load address of array of frame sizes into rsi (intptr_t*)
3683 __ movptr(rsi, Address(rdi, 3686 __ movptr(rsi, Address(rdi, Deoptimization::UnrollBlock:: frame_sizes_offset_in_bytes()));
3684 Deoptimization::UnrollBlock::
3685 frame_sizes_offset_in_bytes()));
3686 3687
3687 // Counter 3688 // Counter
3688 __ movl(rdx, Address(rdi, 3689 __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock:: number_of_frames_offset_in_bytes())); // (int)
3689 Deoptimization::UnrollBlock::
3690 number_of_frames_offset_in_bytes())); // (int)
3691
3692 // Pick up the initial fp we should save
3693 __ movptr(rbp,
3694 Address(rdi,
3695 Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
3696 3690
3697 // Now adjust the caller's stack to make up for the extra locals but 3691 // Now adjust the caller's stack to make up for the extra locals but
3698 // record the original sp so that we can save it in the skeletal 3692 // record the original sp so that we can save it in the skeletal
3699 // interpreter frame and the stack walking of interpreter_sender 3693 // interpreter frame and the stack walking of interpreter_sender
3700 // will get the unextended sp value and not the "real" sp value. 3694 // will get the unextended sp value and not the "real" sp value.
3701 3695
3702 const Register sender_sp = r8; 3696 const Register sender_sp = r8;
3703 3697
3704 __ mov(sender_sp, rsp); 3698 __ mov(sender_sp, rsp);
3705 __ movl(rbx, Address(rdi, 3699 __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock:: caller_adjustment_offset_in_bytes())); // (int)
3706 Deoptimization::UnrollBlock::
3707 caller_adjustment_offset_in_bytes())); // (int)
3708 __ subptr(rsp, rbx); 3700 __ subptr(rsp, rbx);
3709 3701
3710 // Push interpreter frames in a loop 3702 // Push interpreter frames in a loop
3711 Label loop; 3703 Label loop;
3712 __ bind(loop); 3704 __ bind(loop);