797 sim->notifyCompile(name, c2i_entry); |
797 sim->notifyCompile(name, c2i_entry); |
798 FREE_C_HEAP_ARRAY(char, name, mtInternal); |
798 FREE_C_HEAP_ARRAY(char, name, mtInternal); |
799 } |
799 } |
800 #endif |
800 #endif |
801 |
801 |
|
802 // Class initialization barrier for static methods |
|
803 if (VM_Version::supports_fast_class_init_checks()) { |
|
804 Label L_skip_barrier; |
|
805 |
|
806 { // Bypass the barrier for non-static methods |
|
807 __ ldrw(rscratch1, Address(rmethod, Method::access_flags_offset())); |
|
808 __ andsw(zr, rscratch1, JVM_ACC_STATIC); |
|
809 __ br(Assembler::EQ, L_skip_barrier); // non-static |
|
810 } |
|
811 |
|
812 __ load_method_holder(rscratch2, rmethod); |
|
813 __ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier); |
|
814 __ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub())); |
|
815 __ bind(L_skip_barrier); |
|
816 } |
|
817 |
802 gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup); |
818 gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup); |
803 |
819 |
804 __ flush(); |
820 __ flush(); |
805 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); |
821 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); |
806 } |
822 } |
1578 // first instruction with a jump. For this action to be legal we |
1594 // first instruction with a jump. For this action to be legal we |
1579 // must ensure that this first instruction is a B, BL, NOP, BKPT, |
1595 // must ensure that this first instruction is a B, BL, NOP, BKPT, |
1580 // SVC, HVC, or SMC. Make it a NOP. |
1596 // SVC, HVC, or SMC. Make it a NOP. |
1581 __ nop(); |
1597 __ nop(); |
1582 |
1598 |
|
1599 if (VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) { |
|
1600 Label L_skip_barrier; |
|
1601 __ mov_metadata(rscratch2, method->method_holder()); // InstanceKlass* |
|
1602 __ clinit_barrier(rscratch2, rscratch1, &L_skip_barrier); |
|
1603 __ far_jump(RuntimeAddress(SharedRuntime::get_handle_wrong_method_stub())); |
|
1604 |
|
1605 __ bind(L_skip_barrier); |
|
1606 } |
|
1607 |
1583 // Generate stack overflow check |
1608 // Generate stack overflow check |
1584 if (UseStackBanging) { |
1609 if (UseStackBanging) { |
1585 __ bang_stack_with_offset(JavaThread::stack_shadow_zone_size()); |
1610 __ bang_stack_with_offset(JavaThread::stack_shadow_zone_size()); |
1586 } else { |
1611 } else { |
1587 Unimplemented(); |
1612 Unimplemented(); |