src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
changeset 55521 f9a2f93a0c87
parent 55398 e53ec3b362f4
child 57565 01bca26734bb
equal deleted inserted replaced
55520:33bb8c970770 55521:f9a2f93a0c87
  1305 #undef IS_A_TEMP
  1305 #undef IS_A_TEMP
  1306 
  1306 
  1307   bind(L_fallthrough);
  1307   bind(L_fallthrough);
  1308 }
  1308 }
  1309 
  1309 
       
  1310 void MacroAssembler::clinit_barrier(Register klass, Register scratch, Label* L_fast_path, Label* L_slow_path) {
       
  1311   assert(L_fast_path != NULL || L_slow_path != NULL, "at least one is required");
       
  1312   assert_different_registers(klass, rthread, scratch);
       
  1313 
       
  1314   Label L_fallthrough, L_tmp;
       
  1315   if (L_fast_path == NULL) {
       
  1316     L_fast_path = &L_fallthrough;
       
  1317   } else if (L_slow_path == NULL) {
       
  1318     L_slow_path = &L_fallthrough;
       
  1319   }
       
  1320   // Fast path check: class is fully initialized
       
  1321   ldrb(scratch, Address(klass, InstanceKlass::init_state_offset()));
       
  1322   subs(zr, scratch, InstanceKlass::fully_initialized);
       
  1323   br(Assembler::EQ, *L_fast_path);
       
  1324 
       
  1325   // Fast path check: current thread is initializer thread
       
  1326   ldr(scratch, Address(klass, InstanceKlass::init_thread_offset()));
       
  1327   cmp(rthread, scratch);
       
  1328 
       
  1329   if (L_slow_path == &L_fallthrough) {
       
  1330     br(Assembler::EQ, *L_fast_path);
       
  1331     bind(*L_slow_path);
       
  1332   } else if (L_fast_path == &L_fallthrough) {
       
  1333     br(Assembler::NE, *L_slow_path);
       
  1334     bind(*L_fast_path);
       
  1335   } else {
       
  1336     Unimplemented();
       
  1337   }
       
  1338 }
  1310 
  1339 
  1311 void MacroAssembler::verify_oop(Register reg, const char* s) {
  1340 void MacroAssembler::verify_oop(Register reg, const char* s) {
  1312   if (!VerifyOops) return;
  1341   if (!VerifyOops) return;
  1313 
  1342 
  1314   // Pass register number to verify_oop_subroutine
  1343   // Pass register number to verify_oop_subroutine
  3681 void MacroAssembler::cmpoop(Register obj1, Register obj2) {
  3710 void MacroAssembler::cmpoop(Register obj1, Register obj2) {
  3682   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
  3711   BarrierSetAssembler* bs = BarrierSet::barrier_set()->barrier_set_assembler();
  3683   bs->obj_equals(this, obj1, obj2);
  3712   bs->obj_equals(this, obj1, obj2);
  3684 }
  3713 }
  3685 
  3714 
       
  3715 void MacroAssembler::load_method_holder(Register holder, Register method) {
       
  3716   ldr(holder, Address(method, Method::const_offset()));                      // ConstMethod*
       
  3717   ldr(holder, Address(holder, ConstMethod::constants_offset()));             // ConstantPool*
       
  3718   ldr(holder, Address(holder, ConstantPool::pool_holder_offset_in_bytes())); // InstanceKlass*
       
  3719 }
       
  3720 
  3686 void MacroAssembler::load_klass(Register dst, Register src) {
  3721 void MacroAssembler::load_klass(Register dst, Register src) {
  3687   if (UseCompressedClassPointers) {
  3722   if (UseCompressedClassPointers) {
  3688     ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes()));
  3723     ldrw(dst, Address(src, oopDesc::klass_offset_in_bytes()));
  3689     decode_klass_not_null(dst);
  3724     decode_klass_not_null(dst);
  3690   } else {
  3725   } else {