--- old/src/cpu/x86/vm/x86_64.ad 2015-11-04 14:32:25.409986487 +0100 +++ new/src/cpu/x86/vm/x86_64.ad 2015-11-04 14:32:25.234969049 +0100 @@ -957,6 +957,8 @@ void MachEpilogNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const { Compile* C = ra_->C; + MacroAssembler _masm(&cbuf); + if (C->max_vector_size() > 16) { // Clear upper bits of YMM registers when current compiled code uses // wide vectors to avoid AVX <-> SSE transition penalty during call. @@ -988,6 +990,10 @@ // popq rbp emit_opcode(cbuf, 0x58 | RBP_enc); + if (StackReservedPages > 0 && C->has_reserved_stack_access()) { + __ reserved_stack_check(); + } + if (do_polling() && C->is_method_compilation()) { MacroAssembler _masm(&cbuf); AddressLiteral polling_page(os::get_polling_page(), relocInfo::poll_return_type);