4370 // use Rklass as a scratch |
4370 // use Rklass as a scratch |
4371 volatile_barrier(MacroAssembler::LoadLoad, Rklass); |
4371 volatile_barrier(MacroAssembler::LoadLoad, Rklass); |
4372 #endif // AARCH64 |
4372 #endif // AARCH64 |
4373 |
4373 |
4374 // get InstanceKlass |
4374 // get InstanceKlass |
4375 __ add(Rklass, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord)); |
|
4376 __ ldr(Rklass, Address(Rklass, sizeof(ConstantPool))); |
|
4377 __ cmp(Rtemp, JVM_CONSTANT_Class); |
4375 __ cmp(Rtemp, JVM_CONSTANT_Class); |
4378 __ b(slow_case, ne); |
4376 __ b(slow_case, ne); |
|
4377 __ load_resolved_klass_at_offset(Rcpool, Rindex, Rklass); |
4379 |
4378 |
4380 // make sure klass is initialized & doesn't have finalizer |
4379 // make sure klass is initialized & doesn't have finalizer |
4381 // make sure klass is fully initialized |
4380 // make sure klass is fully initialized |
4382 __ ldrb(Rtemp, Address(Rklass, InstanceKlass::init_state_offset())); |
4381 __ ldrb(Rtemp, Address(Rklass, InstanceKlass::init_state_offset())); |
4383 __ cmp(Rtemp, InstanceKlass::fully_initialized); |
4382 __ cmp(Rtemp, InstanceKlass::fully_initialized); |
4645 __ mov(R2_ClassCastException_obj, Robj); // convention with generate_ClassCastException_handler() |
4644 __ mov(R2_ClassCastException_obj, Robj); // convention with generate_ClassCastException_handler() |
4646 __ b(Interpreter::_throw_ClassCastException_entry); |
4645 __ b(Interpreter::_throw_ClassCastException_entry); |
4647 |
4646 |
4648 // Get superklass in Rsuper and subklass in Rsub |
4647 // Get superklass in Rsuper and subklass in Rsub |
4649 __ bind(quicked); |
4648 __ bind(quicked); |
4650 __ add(Rtemp, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord)); |
4649 __ load_resolved_klass_at_offset(Rcpool, Rindex, Rsuper); |
4651 __ ldr(Rsuper, Address(Rtemp, sizeof(ConstantPool))); |
|
4652 |
4650 |
4653 __ bind(resolved); |
4651 __ bind(resolved); |
4654 __ load_klass(Rsub, Robj); |
4652 __ load_klass(Rsub, Robj); |
4655 |
4653 |
4656 // Generate subtype check. Blows both tmps and Rtemp. |
4654 // Generate subtype check. Blows both tmps and Rtemp. |
4719 __ pop_ptr(Robj); |
4717 __ pop_ptr(Robj); |
4720 __ b(resolved); |
4718 __ b(resolved); |
4721 |
4719 |
4722 // Get superklass in Rsuper and subklass in Rsub |
4720 // Get superklass in Rsuper and subklass in Rsub |
4723 __ bind(quicked); |
4721 __ bind(quicked); |
4724 __ add(Rtemp, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord)); |
4722 __ load_resolved_klass_at_offset(Rcpool, Rindex, Rsuper); |
4725 __ ldr(Rsuper, Address(Rtemp, sizeof(ConstantPool))); |
|
4726 |
4723 |
4727 __ bind(resolved); |
4724 __ bind(resolved); |
4728 __ load_klass(Rsub, Robj); |
4725 __ load_klass(Rsub, Robj); |
4729 |
4726 |
4730 // Generate subtype check. Blows both tmps and Rtemp. |
4727 // Generate subtype check. Blows both tmps and Rtemp. |