src/cpu/x86/vm/templateTable_x86_64.cpp

changeset 9604
da2e98c027fd
parent 8997
f8a45a60bc6b
child 9637
eef07cd490d4
equal deleted inserted replaced
9603:6ce4101edc7a 9604:da2e98c027fd
1 /* 1 /*
2 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
1663 __ testptr(rbx, rbx); 1663 __ testptr(rbx, rbx);
1664 __ jccb(Assembler::zero, no_mdo); 1664 __ jccb(Assembler::zero, no_mdo);
1665 // Increment the MDO backedge counter 1665 // Increment the MDO backedge counter
1666 const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) + 1666 const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) +
1667 in_bytes(InvocationCounter::counter_offset())); 1667 in_bytes(InvocationCounter::counter_offset()));
1668 __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, 1668 __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, rax, false, Assembler::zero,
1669 rax, false, Assembler::zero, &backedge_counter_overflow); 1669 UseOnStackReplacement ? &backedge_counter_overflow : NULL);
1670 __ jmp(dispatch); 1670 __ jmp(dispatch);
1671 } 1671 }
1672 __ bind(no_mdo); 1672 __ bind(no_mdo);
1673 // Increment backedge counter in MethodCounters* 1673 // Increment backedge counter in MethodCounters*
1674 __ movptr(rcx, Address(rcx, Method::method_counters_offset())); 1674 __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
1675 __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask, 1675 __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
1676 rax, false, Assembler::zero, &backedge_counter_overflow); 1676 rax, false, Assembler::zero,
1677 UseOnStackReplacement ? &backedge_counter_overflow : NULL);
1677 } else { 1678 } else {
1678 // increment counter 1679 // increment counter
1679 __ movptr(rcx, Address(rcx, Method::method_counters_offset())); 1680 __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
1680 __ movl(rax, Address(rcx, be_offset)); // load backedge counter 1681 __ movl(rax, Address(rcx, be_offset)); // load backedge counter
1681 __ incrementl(rax, InvocationCounter::count_increment); // increment counter 1682 __ incrementl(rax, InvocationCounter::count_increment); // increment counter

mercurial