src/cpu/x86/vm/stubGenerator_x86_64.cpp

changeset 4037
da91efe96a93
parent 3969
1d7922586cf6
child 4142
d8ce2825b193
     1.1 --- a/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Fri Aug 31 16:39:35 2012 -0700
     1.2 +++ b/src/cpu/x86/vm/stubGenerator_x86_64.cpp	Sat Sep 01 13:25:18 2012 -0400
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2012, 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 @@ -28,7 +28,7 @@
    1.11  #include "interpreter/interpreter.hpp"
    1.12  #include "nativeInst_x86.hpp"
    1.13  #include "oops/instanceOop.hpp"
    1.14 -#include "oops/methodOop.hpp"
    1.15 +#include "oops/method.hpp"
    1.16  #include "oops/objArrayKlass.hpp"
    1.17  #include "oops/oop.inline.hpp"
    1.18  #include "prims/methodHandles.hpp"
    1.19 @@ -109,7 +109,7 @@
    1.20    //    c_rarg0:   call wrapper address                   address
    1.21    //    c_rarg1:   result                                 address
    1.22    //    c_rarg2:   result type                            BasicType
    1.23 -  //    c_rarg3:   method                                 methodOop
    1.24 +  //    c_rarg3:   method                                 Method*
    1.25    //    c_rarg4:   (interpreter) entry point              address
    1.26    //    c_rarg5:   parameters                             intptr_t*
    1.27    //    16(rbp): parameter size (in words)              int
    1.28 @@ -139,7 +139,7 @@
    1.29    //    c_rarg0:   call wrapper address                   address
    1.30    //    c_rarg1:   result                                 address
    1.31    //    c_rarg2:   result type                            BasicType
    1.32 -  //    c_rarg3:   method                                 methodOop
    1.33 +  //    c_rarg3:   method                                 Method*
    1.34    //    48(rbp): (interpreter) entry point              address
    1.35    //    56(rbp): parameters                             intptr_t*
    1.36    //    64(rbp): parameter size (in words)              int
    1.37 @@ -332,7 +332,7 @@
    1.38  
    1.39      // call Java function
    1.40      __ BIND(parameters_done);
    1.41 -    __ movptr(rbx, method);             // get methodOop
    1.42 +    __ movptr(rbx, method);             // get Method*
    1.43      __ movptr(c_rarg1, entry_point);    // get entry_point
    1.44      __ mov(r13, rsp);                   // set sender sp
    1.45      BLOCK_COMMENT("call Java function");
    1.46 @@ -1027,28 +1027,11 @@
    1.47      // set r12 to heapbase for load_klass()
    1.48      __ reinit_heapbase();
    1.49  
    1.50 -    // make sure klass is 'reasonable'
    1.51 +    // make sure klass is 'reasonable', which is not zero.
    1.52      __ load_klass(rax, rax);  // get klass
    1.53      __ testptr(rax, rax);
    1.54      __ jcc(Assembler::zero, error); // if klass is NULL it is broken
    1.55 -    // Check if the klass is in the right area of memory
    1.56 -    __ mov(c_rarg2, rax);
    1.57 -    __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask());
    1.58 -    __ andptr(c_rarg2, c_rarg3);
    1.59 -    __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits());
    1.60 -    __ cmpptr(c_rarg2, c_rarg3);
    1.61 -    __ jcc(Assembler::notZero, error);
    1.62 -
    1.63 -    // make sure klass' klass is 'reasonable'
    1.64 -    __ load_klass(rax, rax);
    1.65 -    __ testptr(rax, rax);
    1.66 -    __ jcc(Assembler::zero, error); // if klass' klass is NULL it is broken
    1.67 -    // Check if the klass' klass is in the right area of memory
    1.68 -    __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_mask());
    1.69 -    __ andptr(rax, c_rarg3);
    1.70 -    __ movptr(c_rarg3, (intptr_t) Universe::verify_klass_bits());
    1.71 -    __ cmpptr(rax, c_rarg3);
    1.72 -    __ jcc(Assembler::notZero, error);
    1.73 +    // TODO: Future assert that klass is lower 4g memory for UseCompressedKlassPointers
    1.74  
    1.75      // return if everything seems ok
    1.76      __ bind(exit);

mercurial