src/cpu/x86/vm/sharedRuntime_x86_32.cpp

changeset 6115
fca8f4799229
parent 4873
e961c11b85fe
child 6198
55fb97c4c58d
child 6492
1174c8abbdb6
     1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Thu Nov 14 19:27:07 2013 +0100
     1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Wed Nov 20 12:46:08 2013 +0100
     1.3 @@ -3001,6 +3001,10 @@
     1.4  
     1.5    // sp should be pointing at the return address to the caller (3)
     1.6  
     1.7 +  // Pick up the initial fp we should save
     1.8 +  // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
     1.9 +  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
    1.10 +
    1.11    // Stack bang to make sure there's enough room for these interpreter frames.
    1.12    if (UseStackBanging) {
    1.13      __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
    1.14 @@ -3020,9 +3024,6 @@
    1.15    __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
    1.16    __ movl(counter, rbx);
    1.17  
    1.18 -  // Pick up the initial fp we should save
    1.19 -  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
    1.20 -
    1.21    // Now adjust the caller's stack to make up for the extra locals
    1.22    // but record the original sp so that we can save it in the skeletal interpreter
    1.23    // frame and the stack walking of interpreter_sender will get the unextended sp
    1.24 @@ -3220,6 +3221,10 @@
    1.25  
    1.26    // sp should be pointing at the return address to the caller (3)
    1.27  
    1.28 +  // Pick up the initial fp we should save
    1.29 +  // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
    1.30 +  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
    1.31 +
    1.32    // Stack bang to make sure there's enough room for these interpreter frames.
    1.33    if (UseStackBanging) {
    1.34      __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
    1.35 @@ -3240,9 +3245,6 @@
    1.36    __ movl(rbx, Address(rdi, Deoptimization::UnrollBlock::number_of_frames_offset_in_bytes()));
    1.37    __ movl(counter, rbx);
    1.38  
    1.39 -  // Pick up the initial fp we should save
    1.40 -  __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
    1.41 -
    1.42    // Now adjust the caller's stack to make up for the extra locals
    1.43    // but record the original sp so that we can save it in the skeletal interpreter
    1.44    // frame and the stack walking of interpreter_sender will get the unextended sp

mercurial