< prev index next >

src/hotspot/cpu/sparc/macroAssembler_sparc.cpp

Print this page




3817   if (new_val == G0) return;
3818   CardTableModRefBS* bs =
3819     barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set());
3820   assert(bs->kind() == BarrierSet::CardTableForRS ||
3821          bs->kind() == BarrierSet::CardTableExtension, "wrong barrier");
3822   card_table_write(bs->byte_map_base, tmp, store_addr);
3823 }
3824 
3825 // ((OopHandle)result).resolve();
3826 void MacroAssembler::resolve_oop_handle(Register result) {
3827   // OopHandle::resolve is an indirection.
3828   ld_ptr(result, 0, result);
3829 }
3830 
3831 void MacroAssembler::load_mirror(Register mirror, Register method) {
3832   const int mirror_offset = in_bytes(Klass::java_mirror_offset());
3833   ld_ptr(method, in_bytes(Method::const_offset()), mirror);
3834   ld_ptr(mirror, in_bytes(ConstMethod::constants_offset()), mirror);
3835   ld_ptr(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
3836   ld_ptr(mirror, mirror_offset, mirror);

3837 }
3838 
3839 void MacroAssembler::load_klass(Register src_oop, Register klass) {
3840   // The number of bytes in this code is used by
3841   // MachCallDynamicJavaNode::ret_addr_offset()
3842   // if this changes, change that.
3843   if (UseCompressedClassPointers) {
3844     lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass);
3845     decode_klass_not_null(klass);
3846   } else {
3847     ld_ptr(src_oop, oopDesc::klass_offset_in_bytes(), klass);
3848   }
3849 }
3850 
3851 void MacroAssembler::store_klass(Register klass, Register dst_oop) {
3852   if (UseCompressedClassPointers) {
3853     assert(dst_oop != klass, "not enough registers");
3854     encode_klass_not_null(klass);
3855     st(klass, dst_oop, oopDesc::klass_offset_in_bytes());
3856   } else {




3817   if (new_val == G0) return;
3818   CardTableModRefBS* bs =
3819     barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set());
3820   assert(bs->kind() == BarrierSet::CardTableForRS ||
3821          bs->kind() == BarrierSet::CardTableExtension, "wrong barrier");
3822   card_table_write(bs->byte_map_base, tmp, store_addr);
3823 }
3824 
3825 // ((OopHandle)result).resolve();
3826 void MacroAssembler::resolve_oop_handle(Register result) {
3827   // OopHandle::resolve is an indirection.
3828   ld_ptr(result, 0, result);
3829 }
3830 
3831 void MacroAssembler::load_mirror(Register mirror, Register method) {
3832   const int mirror_offset = in_bytes(Klass::java_mirror_offset());
3833   ld_ptr(method, in_bytes(Method::const_offset()), mirror);
3834   ld_ptr(mirror, in_bytes(ConstMethod::constants_offset()), mirror);
3835   ld_ptr(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror);
3836   ld_ptr(mirror, mirror_offset, mirror);
3837   resolve_oop_handle(mirror);
3838 }
3839 
3840 void MacroAssembler::load_klass(Register src_oop, Register klass) {
3841   // The number of bytes in this code is used by
3842   // MachCallDynamicJavaNode::ret_addr_offset()
3843   // if this changes, change that.
3844   if (UseCompressedClassPointers) {
3845     lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass);
3846     decode_klass_not_null(klass);
3847   } else {
3848     ld_ptr(src_oop, oopDesc::klass_offset_in_bytes(), klass);
3849   }
3850 }
3851 
3852 void MacroAssembler::store_klass(Register klass, Register dst_oop) {
3853   if (UseCompressedClassPointers) {
3854     assert(dst_oop != klass, "not enough registers");
3855     encode_klass_not_null(klass);
3856     st(klass, dst_oop, oopDesc::klass_offset_in_bytes());
3857   } else {


< prev index next >