< prev index next >

src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp

Print this page




3676 }
3677 
3678 void MacroAssembler::cmpptr(Register src1, Address src2) {
3679   unsigned long offset;
3680   adrp(rscratch1, src2, offset);
3681   ldr(rscratch1, Address(rscratch1, offset));
3682   cmp(src1, rscratch1);
3683 }
3684 
3685 void MacroAssembler::cmpoop(Register obj1, Register obj2) {
3686   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
3687   bs->obj_equals(this, obj1, obj2);
3688 }
3689 
3690 void MacroAssembler::load_method_holder(Register holder, Register method) {
3691   ldr(holder, Address(method, Method::const_offset()));                      // ConstMethod*
3692   ldr(holder, Address(holder, ConstMethod::constants_offset()));             // ConstantPool*
3693   ldr(holder, Address(holder, ConstantPool::pool_holder_offset_in_bytes())); // InstanceKlass*
3694 }
3695 
3696 void MacroAssembler::load_klass(Register dst, Register src) {
3697   if (UseCompressedClassPointers) {
3698     ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes()));
3699   } else {
3700     ldr(dst, Address(src, oopDesc::klass_offset_in_bytes()));
3701   }
3702 }
3703 
3704 void MacroAssembler::load_klass(Register dst, Register src) {
3705   load_metadata(dst, src);
3706   if (UseCompressedClassPointers) {
3707     andr(dst, dst, oopDesc::compressed_klass_mask());
3708     decode_klass_not_null(dst);
3709   } else {
3710     ubfm(dst, dst, 0, 63 - oopDesc::storage_props_nof_bits);
3711   }
3712 }
3713 
3714 // ((OopHandle)result).resolve();
3715 void MacroAssembler::resolve_oop_handle(Register result, Register tmp) {
3716   // OopHandle::resolve is an indirection.


5894   pop(saved_regs, sp);
5895 }
5896 
5897 // C2 compiled method's prolog code 
5898 // Moved here from aarch64.ad to support Valhalla code belows
5899 void MacroAssembler::verified_entry(Compile* C, int sp_inc) {
5900 
5901 // n.b. frame size includes space for return pc and rfp
5902   const long framesize = C->frame_size_in_bytes();
5903   assert(framesize % (2 * wordSize) == 0, "must preserve 2 * wordSize alignment");
5904 
5905   // insert a nop at the start of the prolog so we can patch in a
5906   // branch if we need to invalidate the method later
5907   nop();
5908 
5909   int bangsize = C->bang_size_in_bytes();
5910   if (C->need_stack_bang(bangsize) && UseStackBanging)
5911      generate_stack_overflow_check(bangsize);
5912 
5913   build_frame(framesize);
5914 
5915   if (NotifySimulator) {
5916     notify(Assembler::method_entry);
5917   }
5918 
5919   if (VerifyStackAtCalls) {
5920     Unimplemented();
5921   }
5922 }
5923 
5924 int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_interpreter) {
5925   // A value type might be returned. If fields are in registers we
5926   // need to allocate a value type instance and initialize it with
5927   // the value of the fields.
5928   Label skip;
5929   // We only need a new buffered value if a new one is not returned
5930   cmp(r0, (u1) 1);
5931   br(Assembler::EQ, skip);
5932   int call_offset = -1;
5933 
5934   Label slow_case;
5935 
5936   // Try to allocate a new buffered value (from the heap)
5937   if (UseTLAB) {




3676 }
3677 
3678 void MacroAssembler::cmpptr(Register src1, Address src2) {
3679   unsigned long offset;
3680   adrp(rscratch1, src2, offset);
3681   ldr(rscratch1, Address(rscratch1, offset));
3682   cmp(src1, rscratch1);
3683 }
3684 
3685 void MacroAssembler::cmpoop(Register obj1, Register obj2) {
3686   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
3687   bs->obj_equals(this, obj1, obj2);
3688 }
3689 
3690 void MacroAssembler::load_method_holder(Register holder, Register method) {
3691   ldr(holder, Address(method, Method::const_offset()));                      // ConstMethod*
3692   ldr(holder, Address(holder, ConstMethod::constants_offset()));             // ConstantPool*
3693   ldr(holder, Address(holder, ConstantPool::pool_holder_offset_in_bytes())); // InstanceKlass*
3694 }
3695 
3696 void MacroAssembler::load_metadata(Register dst, Register src) {
3697   if (UseCompressedClassPointers) {
3698     ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes()));
3699   } else {
3700     ldr(dst, Address(src, oopDesc::klass_offset_in_bytes()));
3701   }
3702 }
3703 
3704 void MacroAssembler::load_klass(Register dst, Register src) {
3705   load_metadata(dst, src);
3706   if (UseCompressedClassPointers) {
3707     andr(dst, dst, oopDesc::compressed_klass_mask());
3708     decode_klass_not_null(dst);
3709   } else {
3710     ubfm(dst, dst, 0, 63 - oopDesc::storage_props_nof_bits);
3711   }
3712 }
3713 
3714 // ((OopHandle)result).resolve();
3715 void MacroAssembler::resolve_oop_handle(Register result, Register tmp) {
3716   // OopHandle::resolve is an indirection.


5894   pop(saved_regs, sp);
5895 }
5896 
5897 // C2 compiled method's prolog code 
5898 // Moved here from aarch64.ad to support Valhalla code belows
5899 void MacroAssembler::verified_entry(Compile* C, int sp_inc) {
5900 
5901 // n.b. frame size includes space for return pc and rfp
5902   const long framesize = C->frame_size_in_bytes();
5903   assert(framesize % (2 * wordSize) == 0, "must preserve 2 * wordSize alignment");
5904 
5905   // insert a nop at the start of the prolog so we can patch in a
5906   // branch if we need to invalidate the method later
5907   nop();
5908 
5909   int bangsize = C->bang_size_in_bytes();
5910   if (C->need_stack_bang(bangsize) && UseStackBanging)
5911      generate_stack_overflow_check(bangsize);
5912 
5913   build_frame(framesize);




5914 
5915   if (VerifyStackAtCalls) {
5916     Unimplemented();
5917   }
5918 }
5919 
5920 int MacroAssembler::store_value_type_fields_to_buf(ciValueKlass* vk, bool from_interpreter) {
5921   // A value type might be returned. If fields are in registers we
5922   // need to allocate a value type instance and initialize it with
5923   // the value of the fields.
5924   Label skip;
5925   // We only need a new buffered value if a new one is not returned
5926   cmp(r0, (u1) 1);
5927   br(Assembler::EQ, skip);
5928   int call_offset = -1;
5929 
5930   Label slow_case;
5931 
5932   // Try to allocate a new buffered value (from the heap)
5933   if (UseTLAB) {


< prev index next >