< prev index next >

src/cpu/s390/vm/s390.ad

Print this page
rev 12483 : 8172049: [s390] Implement "JEP 270: Reserved Stack Areas for Critical Sections".

*** 907,935 **** __ verify_thread(); // If this does safepoint polling, then do it here. bool need_polling = do_polling() && C->is_method_compilation(); - // Touch the polling page. - // Part 1: get the page's address. - if (need_polling) { - AddressLiteral pp(os::get_polling_page()); - __ load_const_optimized(Z_R1_scratch, pp); - } - // Pop frame, restore return_pc, and all stuff needed by interpreter. ! // Pop frame by add insted of load (a penny saved is a penny got :-). int frame_size_in_bytes = Assembler::align((C->frame_slots() << LogBytesPerInt), frame::alignment_in_bytes); int retPC_offset = frame_size_in_bytes + _z_abi16(return_pc); if (Displacement::is_validDisp(retPC_offset)) { __ z_lg(Z_R14, retPC_offset, Z_SP); __ add2reg(Z_SP, frame_size_in_bytes); } else { __ add2reg(Z_SP, frame_size_in_bytes); __ restore_return_pc(); } // Touch the polling page, // part 2: touch the page now. if (need_polling) { // We need to mark the code position where the load from the safepoint // polling page was emitted as relocInfo::poll_return_type here. --- 907,939 ---- __ verify_thread(); // If this does safepoint polling, then do it here. bool need_polling = do_polling() && C->is_method_compilation(); // Pop frame, restore return_pc, and all stuff needed by interpreter. ! // Pop frame by add instead of load (a penny saved is a penny got :-). int frame_size_in_bytes = Assembler::align((C->frame_slots() << LogBytesPerInt), frame::alignment_in_bytes); int retPC_offset = frame_size_in_bytes + _z_abi16(return_pc); if (Displacement::is_validDisp(retPC_offset)) { __ z_lg(Z_R14, retPC_offset, Z_SP); __ add2reg(Z_SP, frame_size_in_bytes); } else { __ add2reg(Z_SP, frame_size_in_bytes); __ restore_return_pc(); } + if (StackReservedPages > 0 && C->has_reserved_stack_access()) { + __ reserved_stack_check(Z_R14); + } + + // Touch the polling page. + // Part 1: get the page's address. + if (need_polling) { + AddressLiteral pp(os::get_polling_page()); + __ load_const_optimized(Z_R1_scratch, pp); + } + // Touch the polling page, // part 2: touch the page now. if (need_polling) { // We need to mark the code position where the load from the safepoint // polling page was emitted as relocInfo::poll_return_type here.
< prev index next >