src/cpu/sparc/vm/interp_masm_sparc.cpp

changeset 2438
dd031b2226de
parent 2314
f95d63e2154a
child 2698
38fea01eb669
     1.1 --- a/src/cpu/sparc/vm/interp_masm_sparc.cpp	Mon Jan 10 03:58:07 2011 -0800
     1.2 +++ b/src/cpu/sparc/vm/interp_masm_sparc.cpp	Mon Jan 10 18:46:29 2011 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2011, 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 @@ -1295,16 +1295,13 @@
    1.11  // Get the method data pointer from the methodOop and set the
    1.12  // specified register to its value.
    1.13  
    1.14 -void InterpreterMacroAssembler::set_method_data_pointer_offset(Register Roff) {
    1.15 +void InterpreterMacroAssembler::set_method_data_pointer() {
    1.16    assert(ProfileInterpreter, "must be profiling interpreter");
    1.17    Label get_continue;
    1.18  
    1.19    ld_ptr(Lmethod, in_bytes(methodOopDesc::method_data_offset()), ImethodDataPtr);
    1.20    test_method_data_pointer(get_continue);
    1.21    add(ImethodDataPtr, in_bytes(methodDataOopDesc::data_offset()), ImethodDataPtr);
    1.22 -  if (Roff != noreg)
    1.23 -    // Roff contains a method data index ("mdi").  It defaults to zero.
    1.24 -    add(ImethodDataPtr, Roff, ImethodDataPtr);
    1.25    bind(get_continue);
    1.26  }
    1.27  
    1.28 @@ -1315,10 +1312,11 @@
    1.29    Label zero_continue;
    1.30  
    1.31    // Test MDO to avoid the call if it is NULL.
    1.32 -  ld_ptr(Lmethod, methodOopDesc::method_data_offset(), ImethodDataPtr);
    1.33 +  ld_ptr(Lmethod, in_bytes(methodOopDesc::method_data_offset()), ImethodDataPtr);
    1.34    test_method_data_pointer(zero_continue);
    1.35    call_VM_leaf(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::bcp_to_di), Lmethod, Lbcp);
    1.36 -  set_method_data_pointer_offset(O0);
    1.37 +  add(ImethodDataPtr, in_bytes(methodDataOopDesc::data_offset()), ImethodDataPtr);
    1.38 +  add(ImethodDataPtr, O0, ImethodDataPtr);
    1.39    bind(zero_continue);
    1.40  }
    1.41  
    1.42 @@ -1369,7 +1367,6 @@
    1.43  }
    1.44  
    1.45  void InterpreterMacroAssembler::test_invocation_counter_for_mdp(Register invocation_count,
    1.46 -                                                                Register cur_bcp,
    1.47                                                                  Register Rtmp,
    1.48                                                                  Label &profile_continue) {
    1.49    assert(ProfileInterpreter, "must be profiling interpreter");
    1.50 @@ -1400,8 +1397,8 @@
    1.51    delayed()->nop();
    1.52  
    1.53    // Build it now.
    1.54 -  call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method), cur_bcp);
    1.55 -  set_method_data_pointer_offset(O0);
    1.56 +  call_VM(noreg, CAST_FROM_FN_PTR(address, InterpreterRuntime::profile_method));
    1.57 +  set_method_data_pointer_for_bcp();
    1.58    ba(false, profile_continue);
    1.59    delayed()->nop();
    1.60    bind(done);

mercurial