src/cpu/x86/vm/interp_masm_x86_64.cpp

changeset 4936
aeaca88565e6
parent 4299
f34d701e952e
child 5914
d13d7aba8c12
     1.1 --- a/src/cpu/x86/vm/interp_masm_x86_64.cpp	Thu Apr 04 21:15:43 2013 -0700
     1.2 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp	Tue Apr 09 17:17:41 2013 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -271,6 +271,20 @@
    1.11    addptr(cache, tmp);  // construct pointer to cache entry
    1.12  }
    1.13  
    1.14 +void InterpreterMacroAssembler::get_method_counters(Register method,
    1.15 +                                                    Register mcs, Label& skip) {
    1.16 +  Label has_counters;
    1.17 +  movptr(mcs, Address(method, Method::method_counters_offset()));
    1.18 +  testptr(mcs, mcs);
    1.19 +  jcc(Assembler::notZero, has_counters);
    1.20 +  call_VM(noreg, CAST_FROM_FN_PTR(address,
    1.21 +          InterpreterRuntime::build_method_counters), method);
    1.22 +  movptr(mcs, Address(method,Method::method_counters_offset()));
    1.23 +  testptr(mcs, mcs);
    1.24 +  jcc(Assembler::zero, skip); // No MethodCounters allocated, OutOfMemory
    1.25 +  bind(has_counters);
    1.26 +}
    1.27 +
    1.28  // Load object from cpool->resolved_references(index)
    1.29  void InterpreterMacroAssembler::load_resolved_reference_at_index(
    1.30                                             Register result, Register index) {

mercurial