hotspot/src/cpu/x86/vm/x86_64.ad
changeset 35135 dd2ce9021031
parent 35086 bbf32241d851
parent 35071 a0910b1d3e0d
child 35146 9ebfec283f56
--- a/hotspot/src/cpu/x86/vm/x86_64.ad	Thu Dec 17 23:36:28 2015 +0000
+++ b/hotspot/src/cpu/x86/vm/x86_64.ad	Fri Dec 18 12:39:02 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);