< prev index next >

src/cpu/s390/vm/c1_LIRAssembler_s390.cpp

Print this page




1122 
1123   if (patch != NULL) {
1124     patching_epilog(patch, patch_code, dest, info);
1125   }
1126 
1127   if (info != NULL) add_debug_info_for_null_check(offset, info);
1128 }
1129 
1130 
1131 void LIR_Assembler::return_op(LIR_Opr result) {
1132   assert(result->is_illegal() ||
1133          (result->is_single_cpu() && result->as_register() == Z_R2) ||
1134          (result->is_double_cpu() && result->as_register_lo() == Z_R2) ||
1135          (result->is_single_fpu() && result->as_float_reg() == Z_F0) ||
1136          (result->is_double_fpu() && result->as_double_reg() == Z_F0), "convention");
1137 
1138   AddressLiteral pp(os::get_polling_page());
1139   __ load_const_optimized(Z_R1_scratch, pp);
1140 
1141   // Pop the frame before the safepoint code.
1142   int retPC_offset = initial_frame_size_in_bytes() + _z_abi16(return_pc);
1143   if (Displacement::is_validDisp(retPC_offset)) {
1144     __ z_lg(Z_R14, retPC_offset, Z_SP);
1145     __ add2reg(Z_SP, initial_frame_size_in_bytes());
1146   } else {
1147     __ add2reg(Z_SP, initial_frame_size_in_bytes());
1148     __ restore_return_pc();
1149   }
1150 
1151   if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) {
1152     __ reserved_stack_check(Z_R14);
1153   }
1154 
1155   // We need to mark the code position where the load from the safepoint
1156   // polling page was emitted as relocInfo::poll_return_type here.
1157   __ relocate(relocInfo::poll_return_type);
1158   __ load_from_polling_page(Z_R1_scratch);
1159 
1160   __ z_br(Z_R14); // Return to caller.
1161 }
1162 
1163 int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
1164   AddressLiteral pp(os::get_polling_page());
1165   __ load_const_optimized(tmp->as_register_lo(), pp);
1166   guarantee(info != NULL, "Shouldn't be NULL");
1167   add_debug_info_for_branch(info);
1168   int offset = __ offset();
1169   __ relocate(relocInfo::poll_type);




1122 
1123   if (patch != NULL) {
1124     patching_epilog(patch, patch_code, dest, info);
1125   }
1126 
1127   if (info != NULL) add_debug_info_for_null_check(offset, info);
1128 }
1129 
1130 
1131 void LIR_Assembler::return_op(LIR_Opr result) {
1132   assert(result->is_illegal() ||
1133          (result->is_single_cpu() && result->as_register() == Z_R2) ||
1134          (result->is_double_cpu() && result->as_register_lo() == Z_R2) ||
1135          (result->is_single_fpu() && result->as_float_reg() == Z_F0) ||
1136          (result->is_double_fpu() && result->as_double_reg() == Z_F0), "convention");
1137 
1138   AddressLiteral pp(os::get_polling_page());
1139   __ load_const_optimized(Z_R1_scratch, pp);
1140 
1141   // Pop the frame before the safepoint code.
1142   __ pop_frame_restore_retPC(initial_frame_size_in_bytes());







1143 
1144   if (StackReservedPages > 0 && compilation()->has_reserved_stack_access()) {
1145     __ reserved_stack_check(Z_R14);
1146   }
1147 
1148   // We need to mark the code position where the load from the safepoint
1149   // polling page was emitted as relocInfo::poll_return_type here.
1150   __ relocate(relocInfo::poll_return_type);
1151   __ load_from_polling_page(Z_R1_scratch);
1152 
1153   __ z_br(Z_R14); // Return to caller.
1154 }
1155 
1156 int LIR_Assembler::safepoint_poll(LIR_Opr tmp, CodeEmitInfo* info) {
1157   AddressLiteral pp(os::get_polling_page());
1158   __ load_const_optimized(tmp->as_register_lo(), pp);
1159   guarantee(info != NULL, "Shouldn't be NULL");
1160   add_debug_info_for_branch(info);
1161   int offset = __ offset();
1162   __ relocate(relocInfo::poll_type);


< prev index next >