src/cpu/x86/vm/vtableStubs_x86_64.cpp

changeset 548
ba764ed4b6f2
parent 451
f8236e79048a
child 631
d1605aabd0a1
     1.1 --- a/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Fri Apr 11 09:56:35 2008 -0400
     1.2 +++ b/src/cpu/x86/vm/vtableStubs_x86_64.cpp	Sun Apr 13 17:43:42 2008 -0400
     1.3 @@ -56,7 +56,7 @@
     1.4  
     1.5    // get receiver klass
     1.6    address npe_addr = __ pc();
     1.7 -  __ movq(rax, Address(j_rarg0, oopDesc::klass_offset_in_bytes()));
     1.8 +  __ load_klass(rax, j_rarg0);
     1.9  
    1.10    // compute entry offset (in words)
    1.11    int entry_offset =
    1.12 @@ -131,7 +131,7 @@
    1.13    // get receiver klass (also an implicit null-check)
    1.14    address npe_addr = __ pc();
    1.15  
    1.16 -  __ movq(rbx, Address(j_rarg0, oopDesc::klass_offset_in_bytes()));
    1.17 +  __ load_klass(rbx, j_rarg0);
    1.18  
    1.19    // If we take a trap while this arg is on the stack we will not
    1.20    // be able to walk the stack properly. This is not an issue except
    1.21 @@ -181,7 +181,7 @@
    1.22    // Get methodOop and entrypoint for compiler
    1.23  
    1.24    // Get klass pointer again
    1.25 -  __ movq(rax, Address(j_rarg0, oopDesc::klass_offset_in_bytes()));
    1.26 +  __ load_klass(rax, j_rarg0);
    1.27  
    1.28    const Register method = rbx;
    1.29    __ movq(method, Address(rax, j_rarg1, Address::times_1, method_offset));
    1.30 @@ -226,10 +226,12 @@
    1.31  int VtableStub::pd_code_size_limit(bool is_vtable_stub) {
    1.32    if (is_vtable_stub) {
    1.33      // Vtable stub size
    1.34 -    return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0);
    1.35 +    return (DebugVtables ? 512 : 24) + (CountCompiledCalls ? 13 : 0) +
    1.36 +           (UseCompressedOops ? 16 : 0);  // 1 leaq can be 3 bytes + 1 long
    1.37    } else {
    1.38      // Itable stub size
    1.39 -    return (DebugVtables ? 636 : 72) + (CountCompiledCalls ? 13 : 0);
    1.40 +    return (DebugVtables ? 636 : 72) + (CountCompiledCalls ? 13 : 0) +
    1.41 +           (UseCompressedOops ? 32 : 0);  // 2 leaqs
    1.42    }
    1.43  }
    1.44  

mercurial