comparison src/cpu/s390/vm/templateInterpreterGenerator_s390.cpp @ 12547:0c6ed760800c

8172049: [s390] Implement "JEP 270: Reserved Stack Areas for Critical Sections". Reviewed-by: mdoerr
author goetz
date Tue, 27 Dec 2016 16:10:59 +0100
parents 66107bf60a17
children 5e9d9c1b9907 3bc68ff68250
comparison
equal deleted inserted replaced
1:51e8f078df9d 3:e4cb1c3c0455
1110 __ z_slgr(sp_after_resize, Z_R0_scratch); 1110 __ z_slgr(sp_after_resize, Z_R0_scratch);
1111 1111
1112 // top_frame_size = TOP_IJAVA_FRAME_ABI + max_stack + size of interpreter state 1112 // top_frame_size = TOP_IJAVA_FRAME_ABI + max_stack + size of interpreter state
1113 __ add2reg(top_frame_size, 1113 __ add2reg(top_frame_size,
1114 frame::z_top_ijava_frame_abi_size + 1114 frame::z_top_ijava_frame_abi_size +
1115 frame::z_ijava_state_size + 1115 frame::z_ijava_state_size +
1116 frame::interpreter_frame_monitor_size() * wordSize, 1116 frame::interpreter_frame_monitor_size() * wordSize,
1117 max_stack); 1117 max_stack);
1118 1118
1119 // Check if there's room for the new frame... 1119 if (!native_call) {
1120 Register frame_size = max_stack; // Reuse the regiser for max_stack. 1120 // Stack overflow check.
1121 __ z_lgr(frame_size, Z_SP); 1121 // Native calls don't need the stack size check since they have no
1122 __ z_sgr(frame_size, sp_after_resize); 1122 // expression stack and the arguments are already on the stack and
1123 __ z_agr(frame_size, top_frame_size); 1123 // we only add a handful of words to the stack.
1124 generate_stack_overflow_check(frame_size, fp/*tmp1*/); 1124 Register frame_size = max_stack; // Reuse the regiser for max_stack.
1125 __ z_lgr(frame_size, Z_SP);
1126 __ z_sgr(frame_size, sp_after_resize);
1127 __ z_agr(frame_size, top_frame_size);
1128 generate_stack_overflow_check(frame_size, fp/*tmp1*/);
1129 }
1125 1130
1126 DEBUG_ONLY(__ z_cg(Z_R14, _z_abi16(return_pc), Z_SP)); 1131 DEBUG_ONLY(__ z_cg(Z_R14, _z_abi16(return_pc), Z_SP));
1127 __ asm_assert_eq("killed Z_R14", 0); 1132 __ asm_assert_eq("killed Z_R14", 0);
1128 __ resize_frame_absolute(sp_after_resize, fp, true); 1133 __ resize_frame_absolute(sp_after_resize, fp, true);
1129 __ save_return_pc(Z_R14); 1134 __ save_return_pc(Z_R14);