< prev index next >

src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp

Print this page
rev 12487 : 8172049: [s390] Implement "JEP 270: Reserved Stack Areas for Critical Sections".
Reviewed-by: mdoerr

@@ -1114,16 +1114,21 @@
              frame::z_top_ijava_frame_abi_size +
                frame::z_ijava_state_size +
                frame::interpreter_frame_monitor_size() * wordSize,
              max_stack);
 
-  // Check if there's room for the new frame...
+  if (!native_call) {
+    // Stack overflow check.
+    // Native calls don't need the stack size check since they have no
+    // expression stack and the arguments are already on the stack and
+    // we only add a handful of words to the stack.
   Register frame_size = max_stack; // Reuse the regiser for max_stack.
   __ z_lgr(frame_size, Z_SP);
   __ z_sgr(frame_size, sp_after_resize);
   __ z_agr(frame_size, top_frame_size);
   generate_stack_overflow_check(frame_size, fp/*tmp1*/);
+  }
 
   DEBUG_ONLY(__ z_cg(Z_R14, _z_abi16(return_pc), Z_SP));
   __ asm_assert_eq("killed Z_R14", 0);
   __ resize_frame_absolute(sp_after_resize, fp, true);
   __ save_return_pc(Z_R14);
< prev index next >