void LIR_OopMapGenerator::process_move(LIR_Op* op) { LIR_Op1* op1 = op->as_Op1(); LIR_Opr src = op1->in_opr(); LIR_Opr dst = op1->result_opr(); assert(!src->is_stack() || !dst->is_stack(), "No memory-memory moves allowed"); if ((src->is_stack() && frame_map()->is_spill_pos(src)) || (dst->is_stack() && frame_map()->is_spill_pos(dst))) { // Oops in the spill area are handled by another mechanism (see // CodeEmitInfo::record_spilled_oops) return; } if (dst->is_oop()) { assert((src->is_oop() && (src->is_stack() || src->is_register() || src->is_constant()) ) || src->is_address(), "Wrong tracking of oops/non-oops in LIR"); assert(!src->is_stack() || is_marked(src->single_stack_ix()), "Error in tracking of oop stores to stack"); if (dst->is_stack()) { mark(dst->single_stack_ix()); } else if (dst->is_register()) { if (LIRCacheLocals) { if (local_mapping()->is_cache_reg(dst)) { mark(dst); } } else { assert(local_mapping() == NULL, "expected no local mapping"); } } } else { // !dst->is_oop() // Note that dst may be an address assert(!src->is_single_stack() || !is_marked(src->single_stack_ix()), "Error in tracking of oop stores to stack"); assert(!src->is_double_stack() || !is_marked(src->double_stack_ix()), "Error in tracking of oop stores to stack"); assert(!src->is_double_stack() || !is_marked(1 + src->double_stack_ix()), "Error in tracking of oop stores to stack"); if (dst->is_stack()) { if (dst->is_single_stack()) { clear_all(dst->single_stack_ix()); } else { clear_all(dst->double_stack_ix()); clear_all(1 + dst->double_stack_ix()); } } else if (dst->is_register()) { if (LIRCacheLocals) { if (local_mapping()->is_cache_reg(dst)) { clear_all(dst); } } else { assert(local_mapping() == NULL, "expected no local mapping"); } } } }
LIR_Opr LocalMapping::get_cache_reg(LIR_Opr opr) const { RInfo reg; if (opr->is_single_stack()) { reg = get_cache_reg(opr->single_stack_ix()); } else if (opr->is_double_stack() && CacheDoubleWord) { reg = get_cache_reg(opr->double_stack_ix()); } if (reg.is_illegal()) { return LIR_OprFact::illegalOpr; } switch (opr->type()) { case T_INT: case T_OBJECT: if (!reg.is_word()) { return LIR_OprFact::illegalOpr; } break; case T_FLOAT: if (!reg.is_float()) { return LIR_OprFact::illegalOpr; } break; case T_DOUBLE: if (!reg.is_double()) { return LIR_OprFact::illegalOpr; } break; case T_LONG: if (!reg.is_long()) { return LIR_OprFact::illegalOpr; } break; } return LIR_OprFact::rinfo(reg, opr->type()); }