< prev index next >

src/hotspot/cpu/x86/macroAssembler_x86.cpp

Print this page




5593   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
5594   bs->value_copy(this, decorators, src, dst, value_klass);
5595 }
5596 
5597 void MacroAssembler::first_field_offset(Register value_klass, Register offset) {
5598   movptr(offset, Address(value_klass, InstanceKlass::adr_valueklass_fixed_block_offset()));
5599   movl(offset, Address(offset, ValueKlass::first_field_offset_offset()));
5600 }
5601 
5602 void MacroAssembler::data_for_oop(Register oop, Register data, Register value_klass) {
5603   // ((address) (void*) o) + vk->first_field_offset();
5604   Register offset = (data == oop) ? rscratch1 : data;
5605   first_field_offset(value_klass, offset);
5606   if (data == oop) {
5607     addptr(data, offset);
5608   } else {
5609     lea(data, Address(oop, offset));
5610   }
5611 }
5612 


















5613 void MacroAssembler::resolve(DecoratorSet decorators, Register obj) {
5614   // Use stronger ACCESS_WRITE|ACCESS_READ by default.
5615   if ((decorators & (ACCESS_READ | ACCESS_WRITE)) == 0) {
5616     decorators |= ACCESS_READ | ACCESS_WRITE;
5617   }
5618   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
5619   return bs->resolve(this, decorators, obj);
5620 }
5621 
5622 void MacroAssembler::load_heap_oop(Register dst, Address src, Register tmp1,
5623                                    Register thread_tmp, DecoratorSet decorators) {
5624   access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
5625 }
5626 
5627 // Doesn't do verfication, generates fixed size code
5628 void MacroAssembler::load_heap_oop_not_null(Register dst, Address src, Register tmp1,
5629                                             Register thread_tmp, DecoratorSet decorators) {
5630   access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, thread_tmp);
5631 }
5632 




5593   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
5594   bs->value_copy(this, decorators, src, dst, value_klass);
5595 }
5596 
5597 void MacroAssembler::first_field_offset(Register value_klass, Register offset) {
5598   movptr(offset, Address(value_klass, InstanceKlass::adr_valueklass_fixed_block_offset()));
5599   movl(offset, Address(offset, ValueKlass::first_field_offset_offset()));
5600 }
5601 
5602 void MacroAssembler::data_for_oop(Register oop, Register data, Register value_klass) {
5603   // ((address) (void*) o) + vk->first_field_offset();
5604   Register offset = (data == oop) ? rscratch1 : data;
5605   first_field_offset(value_klass, offset);
5606   if (data == oop) {
5607     addptr(data, offset);
5608   } else {
5609     lea(data, Address(oop, offset));
5610   }
5611 }
5612 
5613 void MacroAssembler::data_for_value_array_index(Register array, Register array_klass,
5614                                                 Register index, Register data) {
5615   assert(index != rcx, "index needs to shift by rcx");
5616   assert_different_registers(array, array_klass, index);
5617   assert_different_registers(rcx, array, index);
5618 
5619   // array->base() + (index << Klass::layout_helper_log2_element_size(lh));
5620   movl(rcx, Address(array_klass, Klass::layout_helper_offset()));
5621 
5622   // Klass::layout_helper_log2_element_size(lh)
5623   // (lh >> _lh_log2_element_size_shift) & _lh_log2_element_size_mask;
5624   shrl(rcx, Klass::_lh_log2_element_size_shift);
5625   andl(rcx, Klass::_lh_log2_element_size_mask);
5626   shlptr(index); // index << rcx
5627 
5628   lea(data, Address(array, index, Address::times_1, arrayOopDesc::base_offset_in_bytes(T_VALUETYPE)));
5629 }
5630 
5631 void MacroAssembler::resolve(DecoratorSet decorators, Register obj) {
5632   // Use stronger ACCESS_WRITE|ACCESS_READ by default.
5633   if ((decorators & (ACCESS_READ | ACCESS_WRITE)) == 0) {
5634     decorators |= ACCESS_READ | ACCESS_WRITE;
5635   }
5636   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
5637   return bs->resolve(this, decorators, obj);
5638 }
5639 
5640 void MacroAssembler::load_heap_oop(Register dst, Address src, Register tmp1,
5641                                    Register thread_tmp, DecoratorSet decorators) {
5642   access_load_at(T_OBJECT, IN_HEAP | decorators, dst, src, tmp1, thread_tmp);
5643 }
5644 
5645 // Doesn't do verfication, generates fixed size code
5646 void MacroAssembler::load_heap_oop_not_null(Register dst, Address src, Register tmp1,
5647                                             Register thread_tmp, DecoratorSet decorators) {
5648   access_load_at(T_OBJECT, IN_HEAP | IS_NOT_NULL | decorators, dst, src, tmp1, thread_tmp);
5649 }
5650 


< prev index next >