< prev index next >

src/cpu/x86/vm/templateInterpreter_x86_32.cpp

Print this page
rev 11463 : Backport Traversal GC


 846     // rdi: scratch
 847     //
 848     // rsi: sender sp
 849 
 850     // Preserve the sender sp in case the pre-barrier
 851     // calls the runtime
 852     __ push(rsi);
 853 
 854     // Load the value of the referent field.
 855     const Address field_address(rax, referent_offset);
 856 #if INCLUDE_ALL_GCS
 857     if (UseShenandoahGC) {
 858       // Needs GC barriers
 859       __ load_heap_oop(rax, field_address);
 860     } else
 861 #endif
 862     __ movptr(rax, field_address);
 863 
 864     // Generate the G1 pre-barrier code to log the value of
 865     // the referent field in an SATB buffer.

 866     __ get_thread(rcx);
 867     __ g1_write_barrier_pre(noreg /* obj */,
 868                             rax /* pre_val */,
 869                             rcx /* thread */,
 870                             rbx /* tmp */,
 871                             true /* tosca_save */,
 872                             true /* expand_call */);

 873 
 874     // _areturn
 875     __ pop(rsi);                // get sender sp
 876     __ pop(rdi);                // get return address
 877     __ mov(rsp, rsi);           // set sp to sender sp
 878     __ jmp(rdi);
 879 
 880     __ bind(slow_path);
 881     (void) generate_normal_entry(false);
 882 
 883     return entry;
 884   }
 885 #endif // INCLUDE_ALL_GCS
 886 
 887   // If G1 is not enabled then attempt to go through the accessor entry point
 888   // Reference.get is an accessor
 889   return generate_accessor_entry();
 890 }
 891 
 892 /**




 846     // rdi: scratch
 847     //
 848     // rsi: sender sp
 849 
 850     // Preserve the sender sp in case the pre-barrier
 851     // calls the runtime
 852     __ push(rsi);
 853 
 854     // Load the value of the referent field.
 855     const Address field_address(rax, referent_offset);
 856 #if INCLUDE_ALL_GCS
 857     if (UseShenandoahGC) {
 858       // Needs GC barriers
 859       __ load_heap_oop(rax, field_address);
 860     } else
 861 #endif
 862     __ movptr(rax, field_address);
 863 
 864     // Generate the G1 pre-barrier code to log the value of
 865     // the referent field in an SATB buffer.
 866     if (!UseShenandoahGC || ShenandoahKeepAliveBarrier) {
 867     __ get_thread(rcx);
 868     __ g1_write_barrier_pre(noreg /* obj */,
 869                             rax /* pre_val */,
 870                             rcx /* thread */,
 871                             rbx /* tmp */,
 872                             true /* tosca_save */,
 873                             true /* expand_call */);
 874     }
 875 
 876     // _areturn
 877     __ pop(rsi);                // get sender sp
 878     __ pop(rdi);                // get return address
 879     __ mov(rsp, rsi);           // set sp to sender sp
 880     __ jmp(rdi);
 881 
 882     __ bind(slow_path);
 883     (void) generate_normal_entry(false);
 884 
 885     return entry;
 886   }
 887 #endif // INCLUDE_ALL_GCS
 888 
 889   // If G1 is not enabled then attempt to go through the accessor entry point
 890   // Reference.get is an accessor
 891   return generate_accessor_entry();
 892 }
 893 
 894 /**


< prev index next >