Print this page


Split Close
Expand all
Collapse all
          --- old/src/cpu/x86/vm/interp_masm_x86_64.cpp
          +++ new/src/cpu/x86/vm/interp_masm_x86_64.cpp
↓ open down ↓ 225 lines elided ↑ open up ↑
 226  226    } else {
 227  227      ShouldNotReachHere();
 228  228    }
 229  229  }
 230  230  
 231  231  
 232  232  void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache,
 233  233                                                             Register index,
 234  234                                                             int bcp_offset,
 235  235                                                             size_t index_size) {
 236      -  assert(cache != index, "must use different registers");
      236 +  assert_different_registers(cache, index);
 237  237    get_cache_index_at_bcp(index, bcp_offset, index_size);
 238  238    movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
 239  239    assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
 240  240    // convert from field index to ConstantPoolCacheEntry index
 241  241    shll(index, 2);
 242  242  }
 243  243  
 244  244  
      245 +void InterpreterMacroAssembler::get_cache_and_index_and_bytecode_at_bcp(Register cache,
      246 +                                                                        Register index,
      247 +                                                                        Register bytecode,
      248 +                                                                        int byte_no,
      249 +                                                                        int bcp_offset,
      250 +                                                                        size_t index_size) {
      251 +  get_cache_and_index_at_bcp(cache, index, bcp_offset, index_size);
      252 +  // We use a 32-bit load here since the layout of 64-bit words on
      253 +  // little-endian machines allow us that.
      254 +  movl(bytecode, Address(cache, index, Address::times_ptr, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::indices_offset()));
      255 +  const int shift_count = (1 + byte_no) * BitsPerByte;
      256 +  shrl(bytecode, shift_count);
      257 +  andl(bytecode, 0xFF);
      258 +}
      259 +
      260 +
 245  261  void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache,
 246  262                                                                 Register tmp,
 247  263                                                                 int bcp_offset,
 248  264                                                                 size_t index_size) {
 249  265    assert(cache != tmp, "must use different register");
 250  266    get_cache_index_at_bcp(tmp, bcp_offset, index_size);
 251  267    assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
 252  268    // convert from field index to ConstantPoolCacheEntry index
 253  269    // and from word offset to byte offset
 254  270    shll(tmp, 2 + LogBytesPerWord);
↓ open down ↓ 1208 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX