本文整理汇总了C++中VMReg::as_Register方法的典型用法代码示例。如果您正苦于以下问题:C++ VMReg::as_Register方法的具体用法?C++ VMReg::as_Register怎么用?C++ VMReg::as_Register使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VMReg
的用法示例。
在下文中一共展示了VMReg::as_Register方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: verify_oop_map
void LIR_Assembler::verify_oop_map(CodeEmitInfo* info) {
#ifndef PRODUCT
if (VerifyOops) {
OopMapStream s(info->oop_map());
while (!s.is_done()) {
OopMapValue v = s.current();
if (v.is_oop()) {
VMReg r = v.reg();
if (!r->is_stack()) {
stringStream st;
st.print("bad oop %s at %d", r->as_Register()->name(), _masm->offset());
#ifdef SPARC
_masm->_verify_oop(r->as_Register(), os::strdup(st.as_string(), mtCompiler), __FILE__, __LINE__);
#else
_masm->verify_oop(r->as_Register());
#endif
} else {
_masm->verify_stack_oop(r->reg2stack() * VMRegImpl::stack_slot_size);
}
}
check_codespace();
CHECK_BAILOUT();
s.next();
}
}
#endif
}
示例2: pd_location
address RegisterMap::pd_location(VMReg regname) const {
register_map_init();
assert(regname->is_reg(), "sanity check");
// Only the GPRs get handled this way
if( !regname->is_Register())
return NULL;
// don't talk about bad registers
if ((bad_mask & ((LocationValidType)1 << regname->value())) != 0) {
return NULL;
}
// Convert to a GPR
Register reg;
int second_word = 0;
// 32-bit registers for in, out and local
if (!regname->is_concrete()) {
// HMM ought to return NULL for any non-concrete (odd) vmreg
// this all tied up in the fact we put out double oopMaps for
// register locations. When that is fixed we'd will return NULL
// (or assert here).
reg = regname->prev()->as_Register();
#ifdef _LP64
second_word = sizeof(jint);
#else
return NULL;
#endif // _LP64
} else {
reg = regname->as_Register();
}
if (reg->is_out()) {
assert(_younger_window != NULL, "Younger window should be available");
return second_word + (address)&_younger_window[reg->after_save()->sp_offset_in_saved_window()];
}
if (reg->is_local() || reg->is_in()) {
assert(_window != NULL, "Window should be available");
return second_word + (address)&_window[reg->sp_offset_in_saved_window()];
}
// Only the window'd GPRs get handled this way; not the globals.
return NULL;
}