< prev index next >

src/cpu/aarch64/vm/c1_Runtime1_aarch64.cpp

Print this page
rev 12153 : imported patch shared_sb_stub.patch


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


1133         oop_maps = generate_handle_exception(id, sasm);
1134       }
1135       break;
1136 
1137     case throw_index_exception_id:
1138       { StubFrame f(sasm, "index_range_check_failed", dont_gc_arguments);
1139         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
1140       }
1141       break;
1142 
1143     case throw_array_store_exception_id:
1144       { StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments);
1145         // tos + 0: link
1146         //     + 1: return address
1147         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);
1148       }
1149       break;
1150 
1151 #if INCLUDE_ALL_GCS
1152 
1153     case shenandoah_write_barrier_slow_id:
1154       {
1155         StubFrame f(sasm, "shenandoah_write_barrier", dont_gc_arguments);
1156 
1157         __ enter();
1158         __ push_call_clobbered_registers();
1159         __ call_VM_leaf(CAST_FROM_FN_PTR(address, ShenandoahBarrierSet::write_barrier_c1),
1160                         rthread, r1);
1161         __ mov(rscratch1, r0);
1162         __ pop_call_clobbered_registers();
1163         __ mov(r0, rscratch1);
1164         __ leave();
1165         __ verify_oop(r0);
1166 
1167       }
1168       break;
1169     case g1_pre_barrier_slow_id:
1170       {
1171         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
1172         // arg0 : previous value of memory
1173 
1174         BarrierSet* bs = Universe::heap()->barrier_set();
1175         if (bs->kind() != BarrierSet::G1SATBCTLogging && bs->kind() != BarrierSet::ShenandoahBarrierSet) {
1176           __ mov(r0, (int)id);
1177           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0);
1178           __ should_not_reach_here();
1179           break;
1180         }
1181 
1182         const Register pre_val = r0;
1183         const Register thread = rthread;
1184         const Register tmp = rscratch1;
1185 
1186         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1187                                              SATBMarkQueue::byte_offset_of_active()));
1188 




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

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


1132         oop_maps = generate_handle_exception(id, sasm);
1133       }
1134       break;
1135 
1136     case throw_index_exception_id:
1137       { StubFrame f(sasm, "index_range_check_failed", dont_gc_arguments);
1138         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_index_exception), true);
1139       }
1140       break;
1141 
1142     case throw_array_store_exception_id:
1143       { StubFrame f(sasm, "throw_array_store_exception", dont_gc_arguments);
1144         // tos + 0: link
1145         //     + 1: return address
1146         oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_array_store_exception), true);
1147       }
1148       break;
1149 
1150 #if INCLUDE_ALL_GCS
1151 
















1152     case g1_pre_barrier_slow_id:
1153       {
1154         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
1155         // arg0 : previous value of memory
1156 
1157         BarrierSet* bs = Universe::heap()->barrier_set();
1158         if (bs->kind() != BarrierSet::G1SATBCTLogging && bs->kind() != BarrierSet::ShenandoahBarrierSet) {
1159           __ mov(r0, (int)id);
1160           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0);
1161           __ should_not_reach_here();
1162           break;
1163         }
1164 
1165         const Register pre_val = r0;
1166         const Register thread = rthread;
1167         const Register tmp = rscratch1;
1168 
1169         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1170                                              SATBMarkQueue::byte_offset_of_active()));
1171 


< prev index next >