src/cpu/x86/vm/macroAssembler_x86.cpp

changeset 6723
0bf37f737702
parent 6680
78bbf4d43a14
child 6876
710a3c8b516e
child 7025
b1bc1af04c6e
     1.1 --- a/src/cpu/x86/vm/macroAssembler_x86.cpp	Mon Jun 09 15:42:31 2014 -0700
     1.2 +++ b/src/cpu/x86/vm/macroAssembler_x86.cpp	Tue Apr 01 09:36:49 2014 +0200
     1.3 @@ -1052,7 +1052,7 @@
     1.4    // was post-decremented.)  Skip this address by starting at i=1, and
     1.5    // touch a few more pages below.  N.B.  It is important to touch all
     1.6    // the way down to and including i=StackShadowPages.
     1.7 -  for (int i = 1; i <= StackShadowPages; i++) {
     1.8 +  for (int i = 1; i < StackShadowPages; i++) {
     1.9      // this could be any sized move but this is can be a debugging crumb
    1.10      // so the bigger the better.
    1.11      movptr(Address(tmp, (-i*os::vm_page_size())), size );
    1.12 @@ -6096,7 +6096,7 @@
    1.13  
    1.14  
    1.15  // C2 compiled method's prolog code.
    1.16 -void MacroAssembler::verified_entry(int framesize, bool stack_bang, bool fp_mode_24b) {
    1.17 +void MacroAssembler::verified_entry(int framesize, int stack_bang_size, bool fp_mode_24b) {
    1.18  
    1.19    // WARNING: Initial instruction MUST be 5 bytes or longer so that
    1.20    // NativeJump::patch_verified_entry will be able to patch out the entry
    1.21 @@ -6104,18 +6104,20 @@
    1.22    // the frame allocation can be either 3 or 6 bytes. So if we don't do
    1.23    // stack bang then we must use the 6 byte frame allocation even if
    1.24    // we have no frame. :-(
    1.25 +  assert(stack_bang_size >= framesize || stack_bang_size <= 0, "stack bang size incorrect");
    1.26  
    1.27    assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned");
    1.28    // Remove word for return addr
    1.29    framesize -= wordSize;
    1.30 +  stack_bang_size -= wordSize;
    1.31  
    1.32    // Calls to C2R adapters often do not accept exceptional returns.
    1.33    // We require that their callers must bang for them.  But be careful, because
    1.34    // some VM calls (such as call site linkage) can use several kilobytes of
    1.35    // stack.  But the stack safety zone should account for that.
    1.36    // See bugs 4446381, 4468289, 4497237.
    1.37 -  if (stack_bang) {
    1.38 -    generate_stack_overflow_check(framesize);
    1.39 +  if (stack_bang_size > 0) {
    1.40 +    generate_stack_overflow_check(stack_bang_size);
    1.41  
    1.42      // We always push rbp, so that on return to interpreter rbp, will be
    1.43      // restored correctly and we can correct the stack.

mercurial