src/cpu/x86/vm/sharedRuntime_x86_32.cpp

changeset 6723
0bf37f737702
parent 6558
2100bf712e2a
child 6876
710a3c8b516e
child 8877
f04097176542
     1.1 --- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Mon Jun 09 15:42:31 2014 -0700
     1.2 +++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Tue Apr 01 09:36:49 2014 +0200
     1.3 @@ -3014,11 +3014,15 @@
     1.4    // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
     1.5    __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
     1.6  
     1.7 -  // Stack bang to make sure there's enough room for these interpreter frames.
     1.8 +#ifdef ASSERT
     1.9 +  // Compilers generate code that bang the stack by as much as the
    1.10 +  // interpreter would need. So this stack banging should never
    1.11 +  // trigger a fault. Verify that it does not on non product builds.
    1.12    if (UseStackBanging) {
    1.13      __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
    1.14      __ bang_stack_size(rbx, rcx);
    1.15    }
    1.16 +#endif
    1.17  
    1.18    // Load array of frame pcs into ECX
    1.19    __ movptr(rcx,Address(rdi,Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));
    1.20 @@ -3240,12 +3244,15 @@
    1.21    // restore rbp before stack bang because if stack overflow is thrown it needs to be pushed (and preserved)
    1.22    __ movptr(rbp, Address(rdi, Deoptimization::UnrollBlock::initial_info_offset_in_bytes()));
    1.23  
    1.24 -  // Stack bang to make sure there's enough room for these interpreter frames.
    1.25 +#ifdef ASSERT
    1.26 +  // Compilers generate code that bang the stack by as much as the
    1.27 +  // interpreter would need. So this stack banging should never
    1.28 +  // trigger a fault. Verify that it does not on non product builds.
    1.29    if (UseStackBanging) {
    1.30      __ movl(rbx, Address(rdi ,Deoptimization::UnrollBlock::total_frame_sizes_offset_in_bytes()));
    1.31      __ bang_stack_size(rbx, rcx);
    1.32    }
    1.33 -
    1.34 +#endif
    1.35  
    1.36    // Load array of frame pcs into ECX
    1.37    __ movl(rcx,Address(rdi,Deoptimization::UnrollBlock::frame_pcs_offset_in_bytes()));

mercurial