< prev index next >
src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
Print this page
@@ -1202,10 +1202,21 @@
LIR_Address* addr = new LIR_Address(src, offset, type);
__ load(addr, dst);
}
}
+LIR_Opr LIRGenerator::unpack_offset(LIR_Opr src, LIR_Opr off) {
+ LIR_Opr tmp = new_register(T_LONG);
+ LabelObj* Lcont = new LabelObj();
+ __ move(off, tmp);
+ __ cmp(lir_cond_equal, src, LIR_OprFact::oopConst(NULL));
+ __ branch(lir_cond_equal, T_OBJECT, Lcont->label());
+ __ shift_right(tmp, Unsafe::offset_shift, tmp);
+ __ branch_destination(Lcont->label());
+ return tmp;
+}
+
void LIRGenerator::do_UnsafeGetAndSetObject(UnsafeGetAndSetObject* x) {
BasicType type = x->basic_type();
LIRItem src(x->object(), this);
LIRItem off(x->offset(), this);
LIRItem value(x->value(), this);
< prev index next >