src/cpu/x86/vm/interp_masm_x86_64.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/src/cpu/x86/vm/interp_masm_x86_64.cpp	Thu Oct 22 18:35:26 2009
--- new/src/cpu/x86/vm/interp_masm_x86_64.cpp	Thu Oct 22 18:35:26 2009

*** 183,211 **** --- 183,229 ---- bswapl(reg); shrl(reg, 16); } + void InterpreterMacroAssembler::get_cache_index_at_bcp(Register index, + int bcp_offset, + bool giant_index) { + assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); + if (!giant_index) { + load_unsigned_short(index, Address(r13, bcp_offset)); + } else { + assert(EnableInvokeDynamic, "giant index used only for EnableInvokeDynamic"); + movl(index, Address(r13, bcp_offset)); + // Check if the secondary index definition is still ~x, otherwise + // we have to change the following assembler code to calculate the + // plain index. + assert(constantPoolCacheOopDesc::decode_secondary_index(~123) == 123, "else change next line"); + notl(index); // convert to plain index + } + } + + void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, Register index, ! int bcp_offset) { assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); ! int bcp_offset, + bool giant_index) { assert(cache != index, "must use different registers"); ! load_unsigned_short(index, Address(r13, bcp_offset)); ! get_cache_index_at_bcp(index, bcp_offset, giant_index); movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below"); // convert from field index to ConstantPoolCacheEntry index shll(index, 2); } void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, Register tmp, ! int bcp_offset) { assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); ! int bcp_offset, + bool giant_index) { assert(cache != tmp, "must use different register"); ! load_unsigned_short(tmp, Address(r13, bcp_offset)); ! get_cache_index_at_bcp(tmp, bcp_offset, giant_index); assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below"); // convert from field index to ConstantPoolCacheEntry index // and from word offset to byte offset shll(tmp, 2 + LogBytesPerWord); movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
*** 1234,1255 **** --- 1252,1281 ---- } void InterpreterMacroAssembler::profile_virtual_call(Register receiver, Register mdp, ! Register reg2) { ! Register reg2, + bool receiver_can_be_null) { if (ProfileInterpreter) { Label profile_continue; // If no method data exists, go to profile_continue. test_method_data_pointer(mdp, profile_continue); // We are making a call. Increment the count. increment_mdp_data_at(mdp, in_bytes(CounterData::count_offset())); + Label skip_receiver_profile; + if (receiver_can_be_null) { + testptr(receiver, receiver); + jcc(Assembler::zero, skip_receiver_profile); + } + // Record the receiver type. record_klass_in_profile(receiver, mdp, reg2); + bind(skip_receiver_profile); // The method data pointer needs to be updated to reflect the new target. update_mdp_by_constant(mdp, in_bytes(VirtualCallData:: virtual_call_data_size()));

src/cpu/x86/vm/interp_masm_x86_64.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File