src/cpu/x86/vm/templateTable_x86_32.cpp

changeset 9604
da2e98c027fd
parent 8997
f8a45a60bc6b
child 9637
eef07cd490d4
equal deleted inserted replaced
9603:6ce4101edc7a 9604:da2e98c027fd
1 /* 1 /*
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 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.
1638 __ testptr(rbx, rbx); 1638 __ testptr(rbx, rbx);
1639 __ jccb(Assembler::zero, no_mdo); 1639 __ jccb(Assembler::zero, no_mdo);
1640 // Increment the MDO backedge counter 1640 // Increment the MDO backedge counter
1641 const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) + 1641 const Address mdo_backedge_counter(rbx, in_bytes(MethodData::backedge_counter_offset()) +
1642 in_bytes(InvocationCounter::counter_offset())); 1642 in_bytes(InvocationCounter::counter_offset()));
1643 __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, 1643 __ increment_mask_and_jump(mdo_backedge_counter, increment, mask, rax, false, Assembler::zero,
1644 rax, false, Assembler::zero, &backedge_counter_overflow); 1644 UseOnStackReplacement ? &backedge_counter_overflow : NULL);
1645 __ jmp(dispatch); 1645 __ jmp(dispatch);
1646 } 1646 }
1647 __ bind(no_mdo); 1647 __ bind(no_mdo);
1648 // Increment backedge counter in MethodCounters* 1648 // Increment backedge counter in MethodCounters*
1649 __ movptr(rcx, Address(rcx, Method::method_counters_offset())); 1649 __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
1650 __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask, 1650 __ increment_mask_and_jump(Address(rcx, be_offset), increment, mask,
1651 rax, false, Assembler::zero, &backedge_counter_overflow); 1651 rax, false, Assembler::zero,
1652 UseOnStackReplacement ? &backedge_counter_overflow : NULL);
1652 } else { 1653 } else {
1653 // increment counter 1654 // increment counter
1654 __ movptr(rcx, Address(rcx, Method::method_counters_offset())); 1655 __ movptr(rcx, Address(rcx, Method::method_counters_offset()));
1655 __ movl(rax, Address(rcx, be_offset)); // load backedge counter 1656 __ movl(rax, Address(rcx, be_offset)); // load backedge counter
1656 __ incrementl(rax, InvocationCounter::count_increment); // increment counter 1657 __ incrementl(rax, InvocationCounter::count_increment); // increment counter

mercurial