--- old/src/cpu/x86/vm/sharedRuntime_x86_64.cpp 2013-11-15 12:02:05.601446173 +0100 +++ new/src/cpu/x86/vm/sharedRuntime_x86_64.cpp 2013-11-15 12:02:05.431513444 +0100 @@ -3471,6 +3471,10 @@ // rsp should be pointing at the return address to the caller (3) + // Pick up the initial fp we should save + // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) + __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); + // Stack bang to make sure there's enough room for these interpreter frames. if (UseStackBanging) { __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); @@ -3489,9 +3493,6 @@ // Load counter into rdx __ movl(rdx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes())); - // Pick up the initial fp we should save - __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); - // Now adjust the caller's stack to make up for the extra locals // but record the original sp so that we can save it in the skeletal interpreter // frame and the stack walking of interpreter_sender will get the unextended sp @@ -3663,6 +3664,12 @@ // rsp should be pointing at the return address to the caller (3) + // Pick up the initial fp we should save + // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved) + __ movptr(rbp, + Address(rdi, + Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); + // Stack bang to make sure there's enough room for these interpreter frames. if (UseStackBanging) { __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes())); @@ -3687,11 +3694,6 @@ Deoptimization::UnrollBlock:: number_of_frames_offset_in_bytes())); // (int) - // Pick up the initial fp we should save - __ movptr(rbp, - Address(rdi, - Deoptimization::UnrollBlock::initial_info_offset_in_bytes())); - // Now adjust the caller's stack to make up for the extra locals but // record the original sp so that we can save it in the skeletal // interpreter frame and the stack walking of interpreter_sender