src/cpu/x86/vm/interp_masm_x86_64.hpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   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  *


  67 #else
  68 
  69   // Interpreter-specific registers
  70   void save_bcp() {
  71     movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
  72   }
  73 
  74   void restore_bcp() {
  75     movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
  76   }
  77 
  78   void restore_locals() {
  79     movptr(r14, Address(rbp, frame::interpreter_frame_locals_offset * wordSize));
  80   }
  81 
  82   // Helpers for runtime call arguments/results
  83   void get_method(Register reg) {
  84     movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
  85   }
  86 
  87   void get_constant_pool(Register reg) {
  88     get_method(reg);
  89     movptr(reg, Address(reg, methodOopDesc::constants_offset()));





  90   }
  91 
  92   void get_constant_pool_cache(Register reg) {
  93     get_constant_pool(reg);
  94     movptr(reg, Address(reg, constantPoolOopDesc::cache_offset_in_bytes()));
  95   }
  96 
  97   void get_cpool_and_tags(Register cpool, Register tags) {
  98     get_constant_pool(cpool);
  99     movptr(tags, Address(cpool, constantPoolOopDesc::tags_offset_in_bytes()));
 100   }
 101 
 102   void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset);
 103   void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size = sizeof(u2));
 104   void get_cache_and_index_and_bytecode_at_bcp(Register cache, Register index, Register bytecode, int byte_no, int bcp_offset, size_t index_size = sizeof(u2));
 105   void get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, size_t index_size = sizeof(u2));
 106   void get_cache_index_at_bcp(Register index, int bcp_offset, size_t index_size = sizeof(u2));
 107 
 108   void pop_ptr(Register r = rax);
 109   void pop_i(Register r = rax);


   1 /*
   2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   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  *


  67 #else
  68 
  69   // Interpreter-specific registers
  70   void save_bcp() {
  71     movptr(Address(rbp, frame::interpreter_frame_bcx_offset * wordSize), r13);
  72   }
  73 
  74   void restore_bcp() {
  75     movptr(r13, Address(rbp, frame::interpreter_frame_bcx_offset * wordSize));
  76   }
  77 
  78   void restore_locals() {
  79     movptr(r14, Address(rbp, frame::interpreter_frame_locals_offset * wordSize));
  80   }
  81 
  82   // Helpers for runtime call arguments/results
  83   void get_method(Register reg) {
  84     movptr(reg, Address(rbp, frame::interpreter_frame_method_offset * wordSize));
  85   }
  86 
  87   void get_const(Register reg) {
  88     get_method(reg);
  89     movptr(reg, Address(reg, methodOopDesc::const_offset()));
  90   }
  91 
  92   void get_constant_pool(Register reg) {
  93     get_const(reg);
  94     movptr(reg, Address(reg, constMethodOopDesc::constants_offset()));
  95   }
  96 
  97   void get_constant_pool_cache(Register reg) {
  98     get_constant_pool(reg);
  99     movptr(reg, Address(reg, constantPoolOopDesc::cache_offset_in_bytes()));
 100   }
 101 
 102   void get_cpool_and_tags(Register cpool, Register tags) {
 103     get_constant_pool(cpool);
 104     movptr(tags, Address(cpool, constantPoolOopDesc::tags_offset_in_bytes()));
 105   }
 106 
 107   void get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset);
 108   void get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size = sizeof(u2));
 109   void get_cache_and_index_and_bytecode_at_bcp(Register cache, Register index, Register bytecode, int byte_no, int bcp_offset, size_t index_size = sizeof(u2));
 110   void get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, size_t index_size = sizeof(u2));
 111   void get_cache_index_at_bcp(Register index, int bcp_offset, size_t index_size = sizeof(u2));
 112 
 113   void pop_ptr(Register r = rax);
 114   void pop_i(Register r = rax);