< prev index next >

src/hotspot/cpu/s390/gc/shared/cardTableBarrierSetAssembler_s390.cpp

rename things

10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or                                                             
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License                                                             
12  * version 2 for more details (a copy is included in the LICENSE file that                                                           
13  * accompanied this code).                                                                                                           
14  *                                                                                                                                   
15  * You should have received a copy of the GNU General Public License version                                                         
16  * 2 along with this work; if not, write to the Free Software Foundation,                                                            
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.                                                                     
18  *                                                                                                                                   
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA                                                           
20  * or visit www.oracle.com if you need additional information or have any                                                            
21  * questions.                                                                                                                        
22  *                                                                                                                                   
23  */                                                                                                                                  
24 
25 #include "precompiled.hpp"                                                                                                           
26 #include "asm/macroAssembler.inline.hpp"                                                                                             
27 #include "gc/shared/barrierSet.hpp"                                                                                                  
28 #include "gc/shared/cardTable.hpp"                                                                                                   
29 #include "gc/shared/cardTableBarrierSet.hpp"                                                                                         
30 #include "gc/shared/cardTableModRefBSCodeGen.hpp"                                                                                    
31 #include "gc/shared/collectedHeap.hpp"                                                                                               
32 #include "interpreter/interp_masm.hpp"                                                                                               
33 
34 #define __ masm->                                                                                                                    
35 
36 #ifdef PRODUCT                                                                                                                       
37 #define BLOCK_COMMENT(str) /* nothing */                                                                                             
38 #else                                                                                                                                
39 #define BLOCK_COMMENT(str) __ block_comment(str)                                                                                     
40 #endif                                                                                                                               
41 
42 #define BIND(label) bind(label); BLOCK_COMMENT(#label ":")                                                                           
43 
44 #define TIMES_OOP (UseCompressedOops ? Address::times_4 : Address::times_8)                                                          
45 
46 void CardTableModRefBSCodeGen::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators, Register addr, Registe
47                                                                 bool do_return) {                                                    
48   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(Universe::heap()->barrier_set());                                
49   CardTable* ct = ctbs->card_table();                                                                                                
50   assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");                                                         
51 
52   NearLabel doXC, done;                                                                                                              
53   assert_different_registers(Z_R0, Z_R1, addr, count);                                                                               
54 
55   // Nothing to do if count <= 0.                                                                                                    
56   if (!do_return) {                                                                                                                  
57     __ compare64_and_branch(count, (intptr_t) 0, Assembler::bcondNotHigh, done);                                                     
58   } else {                                                                                                                           
59     __ z_ltgr(count, count);                                                                                                         
60     __ z_bcr(Assembler::bcondNotPositive, Z_R14);                                                                                    
61   }                                                                                                                                  
62 
63   // Note: We can't combine the shifts. We could lose a carry                                                                        
64   // from calculating the array end address.                                                                                         
65   // count = (count-1)*BytesPerHeapOop + addr                                                                                        
66   // Count holds addr of last oop in array then.                                                                                     

10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12  * version 2 for more details (a copy is included in the LICENSE file that
13  * accompanied this code).
14  *
15  * You should have received a copy of the GNU General Public License version
16  * 2 along with this work; if not, write to the Free Software Foundation,
17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18  *
19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20  * or visit www.oracle.com if you need additional information or have any
21  * questions.
22  *
23  */
24 
25 #include "precompiled.hpp"
26 #include "asm/macroAssembler.inline.hpp"
27 #include "gc/shared/barrierSet.hpp"
28 #include "gc/shared/cardTable.hpp"
29 #include "gc/shared/cardTableBarrierSet.hpp"
30 #include "gc/shared/cardTableBarrierSetAssembler.hpp"
31 #include "gc/shared/collectedHeap.hpp"
32 #include "interpreter/interp_masm.hpp"
33 
34 #define __ masm->
35 
36 #ifdef PRODUCT
37 #define BLOCK_COMMENT(str) /* nothing */
38 #else
39 #define BLOCK_COMMENT(str) __ block_comment(str)
40 #endif
41 
42 #define BIND(label) bind(label); BLOCK_COMMENT(#label ":")
43 
44 #define TIMES_OOP (UseCompressedOops ? Address::times_4 : Address::times_8)
45 
46 void CardTableBarrierSetAssembler::gen_write_ref_array_post_barrier(MacroAssembler* masm, DecoratorSet decorators, Register addr, Reg
47                                                                     bool do_return) {
48   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(Universe::heap()->barrier_set());
49   CardTable* ct = ctbs->card_table();
50   assert(sizeof(*ct->byte_map_base()) == sizeof(jbyte), "adjust this code");
51 
52   NearLabel doXC, done;
53   assert_different_registers(Z_R0, Z_R1, addr, count);
54 
55   // Nothing to do if count <= 0.
56   if (!do_return) {
57     __ compare64_and_branch(count, (intptr_t) 0, Assembler::bcondNotHigh, done);
58   } else {
59     __ z_ltgr(count, count);
60     __ z_bcr(Assembler::bcondNotPositive, Z_R14);
61   }
62 
63   // Note: We can't combine the shifts. We could lose a carry
64   // from calculating the array end address.
65   // count = (count-1)*BytesPerHeapOop + addr
66   // Count holds addr of last oop in array then.
< prev index next >