3805 delayed()->mov(store_addr->after_save(), O0); 3806 } 3807 restore(); 3808 3809 bind(filtered); 3810 } 3811 3812 #endif // INCLUDE_ALL_GCS 3813 /////////////////////////////////////////////////////////////////////////////////// 3814 3815 void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) { 3816 // If we're writing constant NULL, we can skip the write barrier. 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 void MacroAssembler::load_mirror(Register mirror, Register method) { 3826 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); 3827 ld_ptr(method, in_bytes(Method::const_offset()), mirror); 3828 ld_ptr(mirror, in_bytes(ConstMethod::constants_offset()), mirror); 3829 ld_ptr(mirror, ConstantPool::pool_holder_offset_in_bytes(), mirror); 3830 ld_ptr(mirror, mirror_offset, mirror); 3831 } 3832 3833 void MacroAssembler::load_klass(Register src_oop, Register klass) { 3834 // The number of bytes in this code is used by 3835 // MachCallDynamicJavaNode::ret_addr_offset() 3836 // if this changes, change that. 3837 if (UseCompressedClassPointers) { 3838 lduw(src_oop, oopDesc::klass_offset_in_bytes(), klass); 3839 decode_klass_not_null(klass); 3840 } else { 3841 ld_ptr(src_oop, oopDesc::klass_offset_in_bytes(), klass); 3842 } 3843 } 3844 | 3805 delayed()->mov(store_addr->after_save(), O0); 3806 } 3807 restore(); 3808 3809 bind(filtered); 3810 } 3811 3812 #endif // INCLUDE_ALL_GCS 3813 /////////////////////////////////////////////////////////////////////////////////// 3814 3815 void MacroAssembler::card_write_barrier_post(Register store_addr, Register new_val, Register tmp) { 3816 // If we're writing constant NULL, we can skip the write barrier. 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 |