< prev index next >

src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp

G1BarrierSet_merge

26 #include "asm/assembler.hpp"                                                                                                         
27 #include "c1/c1_CodeStubs.hpp"                                                                                                       
28 #include "c1/c1_Defs.hpp"                                                                                                            
29 #include "c1/c1_MacroAssembler.hpp"                                                                                                  
30 #include "c1/c1_Runtime1.hpp"                                                                                                        
31 #include "compiler/disassembler.hpp"                                                                                                 
32 #include "gc/shared/cardTable.hpp"                                                                                                   
33 #include "gc/shared/cardTableModRefBS.hpp"                                                                                           
34 #include "interpreter/interpreter.hpp"                                                                                               
35 #include "nativeInst_aarch64.hpp"                                                                                                    
36 #include "oops/compiledICHolder.hpp"                                                                                                 
37 #include "oops/oop.inline.hpp"                                                                                                       
38 #include "prims/jvmtiExport.hpp"                                                                                                     
39 #include "register_aarch64.hpp"                                                                                                      
40 #include "runtime/sharedRuntime.hpp"                                                                                                 
41 #include "runtime/signature.hpp"                                                                                                     
42 #include "runtime/vframe.hpp"                                                                                                        
43 #include "runtime/vframeArray.hpp"                                                                                                   
44 #include "vmreg_aarch64.inline.hpp"                                                                                                  
45 #if INCLUDE_ALL_GCS                                                                                                                  
                                                                                                                                     
46 #include "gc/g1/g1CardTable.hpp"                                                                                                     
47 #include "gc/g1/g1SATBCardTableModRefBS.hpp"                                                                                         
48 #endif                                                                                                                               
49 
50 
51 // Implementation of StubAssembler                                                                                                   
52 
53 int StubAssembler::call_RT(Register oop_result1, Register metadata_result, address entry, int args_size) {                           
54   // setup registers                                                                                                                 
55   assert(!(oop_result1->is_valid() || metadata_result->is_valid()) || oop_result1 != metadata_result, "registers must be different");
56   assert(oop_result1 != rthread && metadata_result != rthread, "registers must be different");                                       
57   assert(args_size >= 0, "illegal args_size");                                                                                       
58   bool align_stack = false;                                                                                                          
59 
60   mov(c_rarg0, rthread);                                                                                                             
61   set_num_rt_args(0); // Nothing on stack                                                                                            
62 
63   Label retaddr;                                                                                                                     
64   set_last_Java_frame(sp, rfp, retaddr, rscratch1);                                                                                  
65 
66   // do the call                                                                                                                     

26 #include "asm/assembler.hpp"
27 #include "c1/c1_CodeStubs.hpp"
28 #include "c1/c1_Defs.hpp"
29 #include "c1/c1_MacroAssembler.hpp"
30 #include "c1/c1_Runtime1.hpp"
31 #include "compiler/disassembler.hpp"
32 #include "gc/shared/cardTable.hpp"
33 #include "gc/shared/cardTableModRefBS.hpp"
34 #include "interpreter/interpreter.hpp"
35 #include "nativeInst_aarch64.hpp"
36 #include "oops/compiledICHolder.hpp"
37 #include "oops/oop.inline.hpp"
38 #include "prims/jvmtiExport.hpp"
39 #include "register_aarch64.hpp"
40 #include "runtime/sharedRuntime.hpp"
41 #include "runtime/signature.hpp"
42 #include "runtime/vframe.hpp"
43 #include "runtime/vframeArray.hpp"
44 #include "vmreg_aarch64.inline.hpp"
45 #if INCLUDE_ALL_GCS
46 #include "gc/g1/g1BarrierSet.hpp"
47 #include "gc/g1/g1CardTable.hpp"

48 #endif
49 
50 
51 // Implementation of StubAssembler
52 
53 int StubAssembler::call_RT(Register oop_result1, Register metadata_result, address entry, int args_size) {
54   // setup registers
55   assert(!(oop_result1->is_valid() || metadata_result->is_valid()) || oop_result1 != metadata_result, "registers must be different");
56   assert(oop_result1 != rthread && metadata_result != rthread, "registers must be different");
57   assert(args_size >= 0, "illegal args_size");
58   bool align_stack = false;
59 
60   mov(c_rarg0, rthread);
61   set_num_rt_args(0); // Nothing on stack
62 
63   Label retaddr;
64   set_last_Java_frame(sp, rfp, retaddr, rscratch1);
65 
66   // do the call

1089         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);                           
1090       }                                                                                                                              
1091       break;                                                                                                                         
1092 
1093     case throw_array_store_exception_id:                                                                                             
1094       { StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments);                                                         
1095         // tos + 0: link                                                                                                             
1096         //     + 1: return address                                                                                                   
1097         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);                     
1098       }                                                                                                                              
1099       break;                                                                                                                         
1100 
1101 #if INCLUDE_ALL_GCS                                                                                                                  
1102 
1103     case g1_pre_barrier_slow_id:                                                                                                     
1104       {                                                                                                                              
1105         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);                                                                      
1106         // arg0 : previous value of memory                                                                                           
1107 
1108         BarrierSet* bs = Universe::heap()->barrier_set();                                                                            
1109         if (bs->kind() != BarrierSet::G1SATBCTLogging) {                                                                             
1110           __ mov(r0, (int)id);                                                                                                       
1111           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0);                                              
1112           __ should_not_reach_here();                                                                                                
1113           break;                                                                                                                     
1114         }                                                                                                                            
1115 
1116         const Register pre_val = r0;                                                                                                 
1117         const Register thread = rthread;                                                                                             
1118         const Register tmp = rscratch1;                                                                                              
1119 
1120         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +                                                  
1121                                              SATBMarkQueue::byte_offset_of_active()));                                               
1122 
1123         Address queue_index(thread, in_bytes(JavaThread::satb_mark_queue_offset() +                                                  
1124                                              SATBMarkQueue::byte_offset_of_index()));                                                
1125         Address buffer(thread, in_bytes(JavaThread::satb_mark_queue_offset() +                                                       
1126                                         SATBMarkQueue::byte_offset_of_buf()));                                                       
1127 
1128         Label done;                                                                                                                  

1089         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
1090       }
1091       break;
1092 
1093     case throw_array_store_exception_id:
1094       { StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments);
1095         // tos + 0: link
1096         //     + 1: return address
1097         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);
1098       }
1099       break;
1100 
1101 #if INCLUDE_ALL_GCS
1102 
1103     case g1_pre_barrier_slow_id:
1104       {
1105         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
1106         // arg0 : previous value of memory
1107 
1108         BarrierSet* bs = Universe::heap()->barrier_set();
1109         if (bs->kind() != BarrierSet::G1BarrierSet) {
1110           __ mov(r0, (int)id);
1111           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0);
1112           __ should_not_reach_here();
1113           break;
1114         }
1115 
1116         const Register pre_val = r0;
1117         const Register thread = rthread;
1118         const Register tmp = rscratch1;
1119 
1120         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1121                                              SATBMarkQueue::byte_offset_of_active()));
1122 
1123         Address queue_index(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1124                                              SATBMarkQueue::byte_offset_of_index()));
1125         Address buffer(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1126                                         SATBMarkQueue::byte_offset_of_buf()));
1127 
1128         Label done;
< prev index next >