本文整理汇总了C++中LIR_Opr::single_stack_ix方法的典型用法代码示例。如果您正苦于以下问题:C++ LIR_Opr::single_stack_ix方法的具体用法?C++ LIR_Opr::single_stack_ix怎么用?C++ LIR_Opr::single_stack_ix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LIR_Opr
的用法示例。
在下文中一共展示了LIR_Opr::single_stack_ix方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_move
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");
}
}
}
}
示例2: regname
VMReg FrameMap::regname(LIR_Opr opr) const {
if (opr->is_single_cpu()) {
assert(!opr->is_virtual(), "should not see virtual registers here");
return opr->as_register()->as_VMReg();
} else if (opr->is_single_stack()) {
return sp_offset2vmreg(sp_offset_for_slot(opr->single_stack_ix()));
} else if (opr->is_address()) {
LIR_Address* addr = opr->as_address_ptr();
assert(addr->base() == stack_pointer(), "sp based addressing only");
return sp_offset2vmreg(in_ByteSize(addr->index()->as_jint()));
}
ShouldNotReachHere();
return VMRegImpl::Bad();
}
示例3: get_cache_reg
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());
}