< prev index next >

src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp

Print this page




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.hpp"
  27 #include "gc/shared/barrierSetAssembler.hpp"
  28 #include "interpreter/bytecodeHistogram.hpp"
  29 #include "interpreter/interp_masm.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "interpreter/interpreterRuntime.hpp"
  32 #include "interpreter/templateInterpreterGenerator.hpp"
  33 #include "interpreter/templateTable.hpp"
  34 #include "oops/arrayOop.hpp"
  35 #include "oops/methodData.hpp"
  36 #include "oops/method.hpp"
  37 #include "oops/oop.inline.hpp"
  38 #include "prims/jvmtiExport.hpp"
  39 #include "prims/jvmtiThreadState.hpp"
  40 #include "runtime/arguments.hpp"
  41 #include "runtime/deoptimization.hpp"
  42 #include "runtime/frame.inline.hpp"
  43 #include "runtime/sharedRuntime.hpp"
  44 #include "runtime/stubRoutines.hpp"
  45 #include "runtime/synchronizer.hpp"
  46 #include "runtime/timer.hpp"
  47 #include "runtime/vframeArray.hpp"


 617   {
 618     Label done;
 619     __ movl(rax, access_flags);
 620     __ testl(rax, JVM_ACC_STATIC);
 621     // get receiver (assume this is frequent case)
 622     __ movptr(rax, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
 623     __ jcc(Assembler::zero, done);
 624     __ load_mirror(rax, rbx);
 625 
 626 #ifdef ASSERT
 627     {
 628       Label L;
 629       __ testptr(rax, rax);
 630       __ jcc(Assembler::notZero, L);
 631       __ stop("synchronization object is NULL");
 632       __ bind(L);
 633     }
 634 #endif // ASSERT
 635 
 636     __ bind(done);

 637   }
 638 
 639   // add space for monitor & lock
 640   __ subptr(rsp, entry_size); // add space for a monitor entry
 641   __ movptr(monitor_block_top, rsp);  // set new monitor block top
 642   // store object
 643   __ movptr(Address(rsp, BasicObjectLock::obj_offset_in_bytes()), rax);
 644   const Register lockreg = NOT_LP64(rdx) LP64_ONLY(c_rarg1);
 645   __ movptr(lockreg, rsp); // object address
 646   __ lock_object(lockreg);
 647 }
 648 
 649 // Generate a fixed interpreter frame. This is identical setup for
 650 // interpreted methods and for native methods hence the shared code.
 651 //
 652 // Args:
 653 //      rax: return address
 654 //      rbx: Method*
 655 //      r14/rdi: pointer to locals
 656 //      r13/rsi: sender sp




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "asm/macroAssembler.hpp"

  27 #include "interpreter/bytecodeHistogram.hpp"
  28 #include "interpreter/interp_masm.hpp"
  29 #include "interpreter/interpreter.hpp"
  30 #include "interpreter/interpreterRuntime.hpp"
  31 #include "interpreter/templateInterpreterGenerator.hpp"
  32 #include "interpreter/templateTable.hpp"
  33 #include "oops/arrayOop.hpp"
  34 #include "oops/methodData.hpp"
  35 #include "oops/method.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "prims/jvmtiExport.hpp"
  38 #include "prims/jvmtiThreadState.hpp"
  39 #include "runtime/arguments.hpp"
  40 #include "runtime/deoptimization.hpp"
  41 #include "runtime/frame.inline.hpp"
  42 #include "runtime/sharedRuntime.hpp"
  43 #include "runtime/stubRoutines.hpp"
  44 #include "runtime/synchronizer.hpp"
  45 #include "runtime/timer.hpp"
  46 #include "runtime/vframeArray.hpp"


 616   {
 617     Label done;
 618     __ movl(rax, access_flags);
 619     __ testl(rax, JVM_ACC_STATIC);
 620     // get receiver (assume this is frequent case)
 621     __ movptr(rax, Address(rlocals, Interpreter::local_offset_in_bytes(0)));
 622     __ jcc(Assembler::zero, done);
 623     __ load_mirror(rax, rbx);
 624 
 625 #ifdef ASSERT
 626     {
 627       Label L;
 628       __ testptr(rax, rax);
 629       __ jcc(Assembler::notZero, L);
 630       __ stop("synchronization object is NULL");
 631       __ bind(L);
 632     }
 633 #endif // ASSERT
 634 
 635     __ bind(done);
 636     __ resolve_for_write(IS_NOT_NULL, rax);
 637   }
 638 
 639   // add space for monitor & lock
 640   __ subptr(rsp, entry_size); // add space for a monitor entry
 641   __ movptr(monitor_block_top, rsp);  // set new monitor block top
 642   // store object
 643   __ movptr(Address(rsp, BasicObjectLock::obj_offset_in_bytes()), rax);
 644   const Register lockreg = NOT_LP64(rdx) LP64_ONLY(c_rarg1);
 645   __ movptr(lockreg, rsp); // object address
 646   __ lock_object(lockreg);
 647 }
 648 
 649 // Generate a fixed interpreter frame. This is identical setup for
 650 // interpreted methods and for native methods hence the shared code.
 651 //
 652 // Args:
 653 //      rax: return address
 654 //      rbx: Method*
 655 //      r14/rdi: pointer to locals
 656 //      r13/rsi: sender sp


< prev index next >