src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/cpu/x86/vm/x86_64.ad

src/cpu/x86/vm/x86_64.ad

Print this page
rev 6086 : 8032410: compiler/uncommontrap/TestStackBangRbp.java times out on Solaris-Sparc V9
Summary: make compiled code bang the stack by the worst case size of the interpreter frame at deoptimization points.
Reviewed-by:

*** 711,728 **** //============================================================================= #ifndef PRODUCT void MachPrologNode::format(PhaseRegAlloc* ra_, outputStream* st) const { Compile* C = ra_->C; ! int framesize = C->frame_slots() << LogBytesPerInt; assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove wordSize for return addr which is already pushed. framesize -= wordSize; ! if (C->need_stack_bang(framesize)) { framesize -= wordSize; ! st->print("# stack bang"); st->print("\n\t"); st->print("pushq rbp\t# Save rbp"); if (framesize) { st->print("\n\t"); st->print("subq rsp, #%d\t# Create frame",framesize); --- 711,729 ---- //============================================================================= #ifndef PRODUCT void MachPrologNode::format(PhaseRegAlloc* ra_, outputStream* st) const { Compile* C = ra_->C; ! int framesize = C->frame_size_in_bytes(); ! int bangsize = C->bang_size_in_bytes(); assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove wordSize for return addr which is already pushed. framesize -= wordSize; ! if (C->need_stack_bang(bangsize)) { framesize -= wordSize; ! st->print("# stack bang (%d bytes)", bangsize); st->print("\n\t"); st->print("pushq rbp\t# Save rbp"); if (framesize) { st->print("\n\t"); st->print("subq rsp, #%d\t# Create frame",framesize);
*** 749,761 **** void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { Compile* C = ra_->C; MacroAssembler _masm(&cbuf); ! int framesize = C->frame_slots() << LogBytesPerInt; ! __ verified_entry(framesize, C->need_stack_bang(framesize), false); C->set_frame_complete(cbuf.insts_size()); if (C->has_mach_constant_base_node()) { // NOTE: We set the table base offset here because users might be --- 750,763 ---- void MachPrologNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { Compile* C = ra_->C; MacroAssembler _masm(&cbuf); ! int framesize = C->frame_size_in_bytes(); ! int bangsize = C->bang_size_in_bytes(); ! __ verified_entry(framesize, C->need_stack_bang(bangsize)?bangsize:0, false); C->set_frame_complete(cbuf.insts_size()); if (C->has_mach_constant_base_node()) { // NOTE: We set the table base offset here because users might be
*** 784,794 **** if (C->max_vector_size() > 16) { st->print("vzeroupper"); st->cr(); st->print("\t"); } ! int framesize = C->frame_slots() << LogBytesPerInt; assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove word for return adr already pushed // and RBP framesize -= 2*wordSize; --- 786,796 ---- if (C->max_vector_size() > 16) { st->print("vzeroupper"); st->cr(); st->print("\t"); } ! int framesize = C->frame_size_in_bytes(); assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove word for return adr already pushed // and RBP framesize -= 2*wordSize;
*** 820,830 **** // wide vectors to avoid AVX <-> SSE transition penalty during call. MacroAssembler _masm(&cbuf); __ vzeroupper(); } ! int framesize = C->frame_slots() << LogBytesPerInt; assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove word for return adr already pushed // and RBP framesize -= 2*wordSize; --- 822,832 ---- // wide vectors to avoid AVX <-> SSE transition penalty during call. MacroAssembler _masm(&cbuf); __ vzeroupper(); } ! int framesize = C->frame_size_in_bytes(); assert((framesize & (StackAlignmentInBytes-1)) == 0, "frame size not aligned"); // Remove word for return adr already pushed // and RBP framesize -= 2*wordSize;
src/cpu/x86/vm/x86_64.ad
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File