--- old/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-08-12 04:58:35.826951734 -0700 +++ new/src/cpu/x86/vm/interp_masm_x86_32.cpp 2011-08-12 04:58:35.544958528 -0700 @@ -233,7 +233,7 @@ void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register index, int bcp_offset, size_t index_size) { - assert(cache != index, "must use different registers"); + assert_different_registers(cache, index); get_cache_index_at_bcp(index, bcp_offset, index_size); movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); assert(sizeof(ConstantPoolCacheEntry) == 4*wordSize, "adjust code below"); @@ -241,6 +241,20 @@ } +void InterpreterMacroAssembler::get_cache_and_index_and_bytecode_at_bcp(Register cache, + Register index, + Register bytecode, + int byte_no, + int bcp_offset, + size_t index_size) { + get_cache_and_index_at_bcp(cache, index, bcp_offset, index_size); + movptr(bytecode, Address(cache, index, Address::times_ptr, constantPoolCacheOopDesc::base_offset() + ConstantPoolCacheEntry::indices_offset())); + const int shift_count = (1 + byte_no) * BitsPerByte; + shrptr(bytecode, shift_count); + andptr(bytecode, 0xFF); +} + + void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp, int bcp_offset, size_t index_size) { assert(cache != tmp, "must use different register");