hotspot/src/cpu/x86/vm/interp_masm_x86_64.cpp
changeset 25714 87fa6860b5ae
parent 24322 c2978d1578e3
child 28650 772aaab2582f
equal deleted inserted replaced
25713:e2ed3bec8c2c 25714:87fa6860b5ae
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   839 #ifndef CC_INTERP
   839 #ifndef CC_INTERP
   840 
   840 
   841 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
   841 void InterpreterMacroAssembler::test_method_data_pointer(Register mdp,
   842                                                          Label& zero_continue) {
   842                                                          Label& zero_continue) {
   843   assert(ProfileInterpreter, "must be profiling interpreter");
   843   assert(ProfileInterpreter, "must be profiling interpreter");
   844   movptr(mdp, Address(rbp, frame::interpreter_frame_mdx_offset * wordSize));
   844   movptr(mdp, Address(rbp, frame::interpreter_frame_mdp_offset * wordSize));
   845   testptr(mdp, mdp);
   845   testptr(mdp, mdp);
   846   jcc(Assembler::zero, zero_continue);
   846   jcc(Assembler::zero, zero_continue);
   847 }
   847 }
   848 
   848 
   849 
   849 
   866   // mdo is guaranteed to be non-zero here, we checked for it before the call.
   866   // mdo is guaranteed to be non-zero here, we checked for it before the call.
   867   movptr(rbx, Address(rbx, in_bytes(Method::method_data_offset())));
   867   movptr(rbx, Address(rbx, in_bytes(Method::method_data_offset())));
   868   addptr(rbx, in_bytes(MethodData::data_offset()));
   868   addptr(rbx, in_bytes(MethodData::data_offset()));
   869   addptr(rax, rbx);
   869   addptr(rax, rbx);
   870   bind(set_mdp);
   870   bind(set_mdp);
   871   movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), rax);
   871   movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), rax);
   872   pop(rbx);
   872   pop(rbx);
   873   pop(rax);
   873   pop(rax);
   874 }
   874 }
   875 
   875 
   876 void InterpreterMacroAssembler::verify_method_data_pointer() {
   876 void InterpreterMacroAssembler::verify_method_data_pointer() {
   989 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
   989 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
   990                                                      int offset_of_disp) {
   990                                                      int offset_of_disp) {
   991   assert(ProfileInterpreter, "must be profiling interpreter");
   991   assert(ProfileInterpreter, "must be profiling interpreter");
   992   Address disp_address(mdp_in, offset_of_disp);
   992   Address disp_address(mdp_in, offset_of_disp);
   993   addptr(mdp_in, disp_address);
   993   addptr(mdp_in, disp_address);
   994   movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
   994   movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
   995 }
   995 }
   996 
   996 
   997 
   997 
   998 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
   998 void InterpreterMacroAssembler::update_mdp_by_offset(Register mdp_in,
   999                                                      Register reg,
   999                                                      Register reg,
  1000                                                      int offset_of_disp) {
  1000                                                      int offset_of_disp) {
  1001   assert(ProfileInterpreter, "must be profiling interpreter");
  1001   assert(ProfileInterpreter, "must be profiling interpreter");
  1002   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
  1002   Address disp_address(mdp_in, reg, Address::times_1, offset_of_disp);
  1003   addptr(mdp_in, disp_address);
  1003   addptr(mdp_in, disp_address);
  1004   movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
  1004   movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
  1005 }
  1005 }
  1006 
  1006 
  1007 
  1007 
  1008 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in,
  1008 void InterpreterMacroAssembler::update_mdp_by_constant(Register mdp_in,
  1009                                                        int constant) {
  1009                                                        int constant) {
  1010   assert(ProfileInterpreter, "must be profiling interpreter");
  1010   assert(ProfileInterpreter, "must be profiling interpreter");
  1011   addptr(mdp_in, constant);
  1011   addptr(mdp_in, constant);
  1012   movptr(Address(rbp, frame::interpreter_frame_mdx_offset * wordSize), mdp_in);
  1012   movptr(Address(rbp, frame::interpreter_frame_mdp_offset * wordSize), mdp_in);
  1013 }
  1013 }
  1014 
  1014 
  1015 
  1015 
  1016 void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) {
  1016 void InterpreterMacroAssembler::update_mdp_for_ret(Register return_bci) {
  1017   assert(ProfileInterpreter, "must be profiling interpreter");
  1017   assert(ProfileInterpreter, "must be profiling interpreter");