src/hotspot/cpu/ppc/sharedRuntime_ppc.cpp
changeset 55322 bc5baf205475
parent 54847 59ea39bb2809
child 55749 cff8aad2593f
equal deleted inserted replaced
55321:ddda023e6f66 55322:bc5baf205475
  1272   // Branch to ic_miss_stub.
  1272   // Branch to ic_miss_stub.
  1273   __ b64_patchable((address)SharedRuntime::get_ic_miss_stub(), relocInfo::runtime_call_type);
  1273   __ b64_patchable((address)SharedRuntime::get_ic_miss_stub(), relocInfo::runtime_call_type);
  1274 
  1274 
  1275   // entry: c2i
  1275   // entry: c2i
  1276 
  1276 
  1277   c2i_entry = gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, call_interpreter, ientry);
  1277   c2i_entry = __ pc();
       
  1278 
       
  1279   // Class initialization barrier for static methods
       
  1280   if (VM_Version::supports_fast_class_init_checks()) {
       
  1281     Label L_skip_barrier;
       
  1282 
       
  1283     { // Bypass the barrier for non-static methods
       
  1284       __ lwz(R0, in_bytes(Method::access_flags_offset()), R19_method);
       
  1285       __ andi_(R0, R0, JVM_ACC_STATIC);
       
  1286       __ beq(CCR0, L_skip_barrier); // non-static
       
  1287     }
       
  1288 
       
  1289     Register klass = R11_scratch1;
       
  1290     __ load_method_holder(klass, R19_method);
       
  1291     __ clinit_barrier(klass, R16_thread, &L_skip_barrier /*L_fast_path*/);
       
  1292 
       
  1293     __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub(), R0);
       
  1294     __ mtctr(klass);
       
  1295     __ bctr();
       
  1296 
       
  1297     __ bind(L_skip_barrier);
       
  1298   }
       
  1299 
       
  1300   gen_c2i_adapter(masm, total_args_passed, comp_args_on_stack, sig_bt, regs, call_interpreter, ientry);
  1278 
  1301 
  1279   return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
  1302   return AdapterHandlerLibrary::new_entry(fingerprint, i2c_entry, c2i_entry, c2i_unverified_entry);
  1280 }
  1303 }
  1281 
  1304 
  1282 #ifdef COMPILER2
  1305 #ifdef COMPILER2
  2104     // because critical section can be large and
  2127     // because critical section can be large and
  2105     // abort anyway. Also nmethod can be deoptimized.
  2128     // abort anyway. Also nmethod can be deoptimized.
  2106     __ tabort_();
  2129     __ tabort_();
  2107   }
  2130   }
  2108 
  2131 
       
  2132   if (VM_Version::supports_fast_class_init_checks() && method->needs_clinit_barrier()) {
       
  2133     Label L_skip_barrier;
       
  2134     Register klass = r_temp_1;
       
  2135     // Notify OOP recorder (don't need the relocation)
       
  2136     AddressLiteral md = __ constant_metadata_address(method->method_holder());
       
  2137     __ load_const_optimized(klass, md.value(), R0);
       
  2138     __ clinit_barrier(klass, R16_thread, &L_skip_barrier /*L_fast_path*/);
       
  2139 
       
  2140     __ load_const_optimized(klass, SharedRuntime::get_handle_wrong_method_stub(), R0);
       
  2141     __ mtctr(klass);
       
  2142     __ bctr();
       
  2143 
       
  2144     __ bind(L_skip_barrier);
       
  2145   }
       
  2146 
  2109   __ save_LR_CR(r_temp_1);
  2147   __ save_LR_CR(r_temp_1);
  2110   __ generate_stack_overflow_check(frame_size_in_bytes); // Check before creating frame.
  2148   __ generate_stack_overflow_check(frame_size_in_bytes); // Check before creating frame.
  2111   __ mr(r_callers_sp, R1_SP);                            // Remember frame pointer.
  2149   __ mr(r_callers_sp, R1_SP);                            // Remember frame pointer.
  2112   __ push_frame(frame_size_in_bytes, r_temp_1);          // Push the c2n adapter's frame.
  2150   __ push_frame(frame_size_in_bytes, r_temp_1);          // Push the c2n adapter's frame.
  2113   frame_done_pc = (intptr_t)__ pc();
  2151   frame_done_pc = (intptr_t)__ pc();