1830 //--------------------------------------------------------------------- |
1830 //--------------------------------------------------------------------- |
1831 // Verified entry point (VEP) |
1831 // Verified entry point (VEP) |
1832 //--------------------------------------------------------------------- |
1832 //--------------------------------------------------------------------- |
1833 wrapper_VEPStart = __ offset(); |
1833 wrapper_VEPStart = __ offset(); |
1834 |
1834 |
|
1835 if (VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) { |
|
1836 Label L_skip_barrier; |
|
1837 Register klass = Z_R1_scratch; |
|
1838 // Notify OOP recorder (don't need the relocation) |
|
1839 AddressLiteral md = __ constant_metadata_address(method->method_holder()); |
|
1840 __ load_const_optimized(klass, md.value()); |
|
1841 __ clinit_barrier(klass, Z_thread, &L_skip_barrier /*L_fast_path*/); |
|
1842 |
|
1843 __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub()); |
|
1844 __ z_br(klass); |
|
1845 |
|
1846 __ bind(L_skip_barrier); |
|
1847 } |
|
1848 |
1835 __ save_return_pc(); |
1849 __ save_return_pc(); |
1836 __ generate_stack_overflow_check(frame_size_in_bytes); // Check before creating frame. |
1850 __ generate_stack_overflow_check(frame_size_in_bytes); // Check before creating frame. |
1837 #ifndef USE_RESIZE_FRAME |
1851 #ifndef USE_RESIZE_FRAME |
1838 __ push_frame(frame_size_in_bytes); // Create a new frame for the wrapper. |
1852 __ push_frame(frame_size_in_bytes); // Create a new frame for the wrapper. |
1839 #else |
1853 #else |
2694 __ z_brne(ic_miss); // Cache miss: call runtime to handle this. |
2708 __ z_brne(ic_miss); // Cache miss: call runtime to handle this. |
2695 |
2709 |
2696 // Fallthru to VEP. Duplicate LTG, but saved taken branch. |
2710 // Fallthru to VEP. Duplicate LTG, but saved taken branch. |
2697 } |
2711 } |
2698 |
2712 |
2699 address c2i_entry; |
2713 address c2i_entry = __ pc(); |
2700 c2i_entry = gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup); |
2714 |
|
2715 // Class initialization barrier for static methods |
|
2716 if (VM_Version::supports_fast_class_init_checks()) { |
|
2717 Label L_skip_barrier; |
|
2718 |
|
2719 { // Bypass the barrier for non-static methods |
|
2720 __ testbit(Address(Z_method, Method::access_flags_offset()), JVM_ACC_STATIC_BIT); |
|
2721 __ z_bfalse(L_skip_barrier); // non-static |
|
2722 } |
|
2723 |
|
2724 Register klass = Z_R11; |
|
2725 __ load_method_holder(klass, Z_method); |
|
2726 __ clinit_barrier(klass, Z_thread, &L_skip_barrier /*L_fast_path*/); |
|
2727 |
|
2728 __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub()); |
|
2729 __ z_br(klass); |
|
2730 |
|
2731 __ bind(L_skip_barrier); |
|
2732 } |
|
2733 |
|
2734 gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, skip_fixup); |
2701 |
2735 |
2702 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); |
2736 return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry); |
2703 } |
2737 } |
2704 |
2738 |
2705 // This function returns the adjust size (in number of words) to a c2i adapter |
2739 // This function returns the adjust size (in number of words) to a c2i adapter |