798 // If the receiver is null then it is OK to jump to the slow path.
799 __ movptr(rax, Address(rsp, wordSize));
800
801 __ testptr(rax, rax);
802 __ jcc(Assembler::zero, slow_path);
803
804 // rax: local 0
805 // rbx: method (but can be used as scratch now)
806 // rdx: scratch
807 // rdi: scratch
808
809 // Generate the G1 pre-barrier code to log the value of
810 // the referent field in an SATB buffer.
811
812 // Load the value of the referent field.
813 const Address field_address(rax, referent_offset);
814 __ load_heap_oop(rax, field_address);
815
816 // Generate the G1 pre-barrier code to log the value of
817 // the referent field in an SATB buffer.
818 __ g1_write_barrier_pre(noreg /* obj */,
819 rax /* pre_val */,
820 r15_thread /* thread */,
821 rbx /* tmp */,
822 true /* tosca_live */,
823 true /* expand_call */);
824
825 // _areturn
826 __ pop(rdi); // get return address
827 __ mov(rsp, r13); // set sp to sender sp
828 __ jmp(rdi);
829 __ ret(0);
830
831 // generate a vanilla interpreter entry as the slow path
832 __ bind(slow_path);
833 (void) generate_normal_entry(false);
834
835 return entry;
836 }
837 #endif // INCLUDE_ALL_GCS
838
839 // If G1 is not enabled then attempt to go through the accessor entry point
840 // Reference.get is an accessor
841 return generate_accessor_entry();
842 }
843
|
798 // If the receiver is null then it is OK to jump to the slow path.
799 __ movptr(rax, Address(rsp, wordSize));
800
801 __ testptr(rax, rax);
802 __ jcc(Assembler::zero, slow_path);
803
804 // rax: local 0
805 // rbx: method (but can be used as scratch now)
806 // rdx: scratch
807 // rdi: scratch
808
809 // Generate the G1 pre-barrier code to log the value of
810 // the referent field in an SATB buffer.
811
812 // Load the value of the referent field.
813 const Address field_address(rax, referent_offset);
814 __ load_heap_oop(rax, field_address);
815
816 // Generate the G1 pre-barrier code to log the value of
817 // the referent field in an SATB buffer.
818 if (!UseShenandoahGC || ShenandoahKeepAliveBarrier) {
819 __ g1_write_barrier_pre(noreg /* obj */,
820 rax /* pre_val */,
821 r15_thread /* thread */,
822 rbx /* tmp */,
823 true /* tosca_live */,
824 true /* expand_call */);
825 }
826
827 // _areturn
828 __ pop(rdi); // get return address
829 __ mov(rsp, r13); // set sp to sender sp
830 __ jmp(rdi);
831 __ ret(0);
832
833 // generate a vanilla interpreter entry as the slow path
834 __ bind(slow_path);
835 (void) generate_normal_entry(false);
836
837 return entry;
838 }
839 #endif // INCLUDE_ALL_GCS
840
841 // If G1 is not enabled then attempt to go through the accessor entry point
842 // Reference.get is an accessor
843 return generate_accessor_entry();
844 }
845
|