< prev index next >

src/hotspot/cpu/ppc/templateTable_ppc_64.cpp

G1BarrierSet_merge

46 
47 // Do an oop store like *(base + index) = val OR *(base + offset) = val                                                              
48 // (only one of both variants is possible at the same time).                                                                         
49 // Index can be noreg.                                                                                                               
50 // Kills:                                                                                                                            
51 //   Rbase, Rtmp                                                                                                                     
52 static void do_oop_store(InterpreterMacroAssembler* _masm,                                                                           
53                          Register           Rbase,                                                                                   
54                          RegisterOrConstant offset,                                                                                  
55                          Register           Rval,         // Noreg means always null.                                                
56                          Register           Rtmp1,                                                                                   
57                          Register           Rtmp2,                                                                                   
58                          Register           Rtmp3,                                                                                   
59                          BarrierSet::Name   barrier,                                                                                 
60                          bool               precise,                                                                                 
61                          bool               check_null) {                                                                            
62   assert_different_registers(Rtmp1, Rtmp2, Rtmp3, Rval, Rbase);                                                                      
63 
64   switch (barrier) {                                                                                                                 
65 #if INCLUDE_ALL_GCS                                                                                                                  
66     case BarrierSet::G1SATBCTLogging:                                                                                                
67       {                                                                                                                              
68         // Load and record the previous value.                                                                                       
69         __ g1_write_barrier_pre(Rbase, offset,                                                                                       
70                                 Rtmp3, /* holder of pre_val ? */                                                                     
71                                 Rtmp1, Rtmp2, false /* frame */);                                                                    
72 
73         Label Lnull, Ldone;                                                                                                          
74         if (Rval != noreg) {                                                                                                         
75           if (check_null) {                                                                                                          
76             __ cmpdi(CCR0, Rval, 0);                                                                                                 
77             __ beq(CCR0, Lnull);                                                                                                     
78           }                                                                                                                          
79           __ store_heap_oop_not_null(Rval, offset, Rbase, /*Rval must stay uncompressed.*/ Rtmp1);                                   
80           // Mark the card.                                                                                                          
81           if (!(offset.is_constant() && offset.as_constant() == 0) && precise) {                                                     
82             __ add(Rbase, offset, Rbase);                                                                                            
83           }                                                                                                                          
84           __ g1_write_barrier_post(Rbase, Rval, Rtmp1, Rtmp2, Rtmp3, /*filtered (fast path)*/ &Ldone);                               
85           if (check_null) { __ b(Ldone); }                                                                                           

46 
47 // Do an oop store like *(base + index) = val OR *(base + offset) = val
48 // (only one of both variants is possible at the same time).
49 // Index can be noreg.
50 // Kills:
51 //   Rbase, Rtmp
52 static void do_oop_store(InterpreterMacroAssembler* _masm,
53                          Register           Rbase,
54                          RegisterOrConstant offset,
55                          Register           Rval,         // Noreg means always null.
56                          Register           Rtmp1,
57                          Register           Rtmp2,
58                          Register           Rtmp3,
59                          BarrierSet::Name   barrier,
60                          bool               precise,
61                          bool               check_null) {
62   assert_different_registers(Rtmp1, Rtmp2, Rtmp3, Rval, Rbase);
63 
64   switch (barrier) {
65 #if INCLUDE_ALL_GCS
66     case BarrierSet::G1BarrierSet:
67       {
68         // Load and record the previous value.
69         __ g1_write_barrier_pre(Rbase, offset,
70                                 Rtmp3, /* holder of pre_val ? */
71                                 Rtmp1, Rtmp2, false /* frame */);
72 
73         Label Lnull, Ldone;
74         if (Rval != noreg) {
75           if (check_null) {
76             __ cmpdi(CCR0, Rval, 0);
77             __ beq(CCR0, Lnull);
78           }
79           __ store_heap_oop_not_null(Rval, offset, Rbase, /*Rval must stay uncompressed.*/ Rtmp1);
80           // Mark the card.
81           if (!(offset.is_constant() && offset.as_constant() == 0) && precise) {
82             __ add(Rbase, offset, Rbase);
83           }
84           __ g1_write_barrier_post(Rbase, Rval, Rtmp1, Rtmp2, Rtmp3, /*filtered (fast path)*/ &Ldone);
85           if (check_null) { __ b(Ldone); }
< prev index next >