src/cpu/ppc/vm/templateTable_ppc_64.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8048721 Sdiff src/cpu/ppc/vm

src/cpu/ppc/vm/templateTable_ppc_64.cpp

Print this page




1657       const int mo_bc_offs = in_bytes(MethodCounters::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
1658       __ bind(Lno_mdo);
1659       __ lwz(Rscratch2, mo_bc_offs, R4_counters);
1660       __ load_const_optimized(Rscratch3, mask, R0);
1661       __ addi(Rscratch2, Rscratch2, increment);
1662       __ stw(Rscratch2, mo_bc_offs, R19_method);
1663       __ and_(Rscratch3, Rscratch2, Rscratch3);
1664       __ bne(CCR0, Lforward);
1665 
1666       __ bind(Loverflow);
1667 
1668       // Notify point for loop, pass branch bytecode.
1669       __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), R14_bcp, true);
1670 
1671       // Was an OSR adapter generated?
1672       // O0 = osr nmethod
1673       __ cmpdi(CCR0, R3_RET, 0);
1674       __ beq(CCR0, Lforward);
1675 
1676       // Has the nmethod been invalidated already?
1677       __ lwz(R0, nmethod::entry_bci_offset(), R3_RET);
1678       __ cmpwi(CCR0, R0, InvalidOSREntryBci);
1679       __ beq(CCR0, Lforward);
1680 
1681       // Migrate the interpreter frame off of the stack.
1682       // We can use all registers because we will not return to interpreter from this point.
1683 
1684       // Save nmethod.
1685       const Register osr_nmethod = R31;
1686       __ mr(osr_nmethod, R3_RET);
1687       __ set_top_ijava_frame_at_SP_as_last_Java_frame(R1_SP, R11_scratch1);
1688       __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin), R16_thread);
1689       __ reset_last_Java_frame();
1690       // OSR buffer is in ARG1.
1691 
1692       // Remove the interpreter frame.
1693       __ merge_frames(/*top_frame_sp*/ R21_sender_SP, /*return_pc*/ R0, R11_scratch1, R12_scratch2);
1694 
1695       // Jump to the osr code.
1696       __ ld(R11_scratch1, nmethod::osr_entry_point_offset(), osr_nmethod);
1697       __ mtlr(R0);
1698       __ mtctr(R11_scratch1);
1699       __ bctr();




1657       const int mo_bc_offs = in_bytes(MethodCounters::backedge_counter_offset()) + in_bytes(InvocationCounter::counter_offset());
1658       __ bind(Lno_mdo);
1659       __ lwz(Rscratch2, mo_bc_offs, R4_counters);
1660       __ load_const_optimized(Rscratch3, mask, R0);
1661       __ addi(Rscratch2, Rscratch2, increment);
1662       __ stw(Rscratch2, mo_bc_offs, R19_method);
1663       __ and_(Rscratch3, Rscratch2, Rscratch3);
1664       __ bne(CCR0, Lforward);
1665 
1666       __ bind(Loverflow);
1667 
1668       // Notify point for loop, pass branch bytecode.
1669       __ call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::frequency_counter_overflow), R14_bcp, true);
1670 
1671       // Was an OSR adapter generated?
1672       // O0 = osr nmethod
1673       __ cmpdi(CCR0, R3_RET, 0);
1674       __ beq(CCR0, Lforward);
1675 
1676       // Has the nmethod been invalidated already?
1677       __ lbz(R0, nmethod::state_offset(), R3_RET);
1678       __ cmpwi(CCR0, R0, 0);
1679       __ bne(CCR0, Lforward);
1680 
1681       // Migrate the interpreter frame off of the stack.
1682       // We can use all registers because we will not return to interpreter from this point.
1683 
1684       // Save nmethod.
1685       const Register osr_nmethod = R31;
1686       __ mr(osr_nmethod, R3_RET);
1687       __ set_top_ijava_frame_at_SP_as_last_Java_frame(R1_SP, R11_scratch1);
1688       __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::OSR_migration_begin), R16_thread);
1689       __ reset_last_Java_frame();
1690       // OSR buffer is in ARG1.
1691 
1692       // Remove the interpreter frame.
1693       __ merge_frames(/*top_frame_sp*/ R21_sender_SP, /*return_pc*/ R0, R11_scratch1, R12_scratch2);
1694 
1695       // Jump to the osr code.
1696       __ ld(R11_scratch1, nmethod::osr_entry_point_offset(), osr_nmethod);
1697       __ mtlr(R0);
1698       __ mtctr(R11_scratch1);
1699       __ bctr();


src/cpu/ppc/vm/templateTable_ppc_64.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File