hotspot/src/cpu/x86/vm/x86_64.ad
changeset 35071 a0910b1d3e0d
parent 34162 16b54851eaf6
child 35135 dd2ce9021031
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Fri Dec 11 13:18:10 2015 +0000
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Fri Dec 11 09:07:07 2015 -0800
@@ -953,10 +953,11 @@
 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.
-    MacroAssembler _masm(&cbuf);
     __ vzeroupper();
   }
 
@@ -984,6 +985,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);