comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 666:7bb995fbd3c0

Merge
author trims
date Thu, 12 Mar 2009 18:16:36 -0700
parents 0fbdb4381b99 2f2f54ed12ce
children bd441136a5ce
comparison
equal deleted inserted replaced
10:1c4b98e19045 15:2152b6f2b79d
188 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache, 188 void InterpreterMacroAssembler::get_cache_and_index_at_bcp(Register cache,
189 Register index, 189 Register index,
190 int bcp_offset) { 190 int bcp_offset) {
191 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); 191 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
192 assert(cache != index, "must use different registers"); 192 assert(cache != index, "must use different registers");
193 load_unsigned_word(index, Address(r13, bcp_offset)); 193 load_unsigned_short(index, Address(r13, bcp_offset));
194 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); 194 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
195 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below"); 195 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
196 // convert from field index to ConstantPoolCacheEntry index 196 // convert from field index to ConstantPoolCacheEntry index
197 shll(index, 2); 197 shll(index, 2);
198 } 198 }
201 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache, 201 void InterpreterMacroAssembler::get_cache_entry_pointer_at_bcp(Register cache,
202 Register tmp, 202 Register tmp,
203 int bcp_offset) { 203 int bcp_offset) {
204 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode"); 204 assert(bcp_offset > 0, "bcp is still pointing to start of bytecode");
205 assert(cache != tmp, "must use different register"); 205 assert(cache != tmp, "must use different register");
206 load_unsigned_word(tmp, Address(r13, bcp_offset)); 206 load_unsigned_short(tmp, Address(r13, bcp_offset));
207 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below"); 207 assert(sizeof(ConstantPoolCacheEntry) == 4 * wordSize, "adjust code below");
208 // convert from field index to ConstantPoolCacheEntry index 208 // convert from field index to ConstantPoolCacheEntry index
209 // and from word offset to byte offset 209 // and from word offset to byte offset
210 shll(tmp, 2 + LogBytesPerWord); 210 shll(tmp, 2 + LogBytesPerWord);
211 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize)); 211 movptr(cache, Address(rbp, frame::interpreter_frame_cache_offset * wordSize));
1061 test_method_data_pointer(c_rarg3, verify_continue); // If mdp is zero, continue 1061 test_method_data_pointer(c_rarg3, verify_continue); // If mdp is zero, continue
1062 get_method(rbx); 1062 get_method(rbx);
1063 1063
1064 // If the mdp is valid, it will point to a DataLayout header which is 1064 // If the mdp is valid, it will point to a DataLayout header which is
1065 // consistent with the bcp. The converse is highly probable also. 1065 // consistent with the bcp. The converse is highly probable also.
1066 load_unsigned_word(c_rarg2, 1066 load_unsigned_short(c_rarg2,
1067 Address(c_rarg3, in_bytes(DataLayout::bci_offset()))); 1067 Address(c_rarg3, in_bytes(DataLayout::bci_offset())));
1068 addptr(c_rarg2, Address(rbx, methodOopDesc::const_offset())); 1068 addptr(c_rarg2, Address(rbx, methodOopDesc::const_offset()));
1069 lea(c_rarg2, Address(c_rarg2, constMethodOopDesc::codes_offset())); 1069 lea(c_rarg2, Address(c_rarg2, constMethodOopDesc::codes_offset()));
1070 cmpptr(c_rarg2, r13); 1070 cmpptr(c_rarg2, r13);
1071 jcc(Assembler::equal, verify_continue); 1071 jcc(Assembler::equal, verify_continue);
1072 // rbx: method 1072 // rbx: method
1591 SkipIfEqual skip(this, &DTraceMethodProbes, false); 1591 SkipIfEqual skip(this, &DTraceMethodProbes, false);
1592 get_method(c_rarg1); 1592 get_method(c_rarg1);
1593 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), 1593 call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry),
1594 r15_thread, c_rarg1); 1594 r15_thread, c_rarg1);
1595 } 1595 }
1596
1597 // RedefineClasses() tracing support for obsolete method entry
1598 if (RC_TRACE_IN_RANGE(0x00001000, 0x00002000)) {
1599 get_method(c_rarg1);
1600 call_VM_leaf(
1601 CAST_FROM_FN_PTR(address, SharedRuntime::rc_trace_method_entry),
1602 r15_thread, c_rarg1);
1603 }
1596 } 1604 }
1597 1605
1598 1606
1599 void InterpreterMacroAssembler::notify_method_exit( 1607 void InterpreterMacroAssembler::notify_method_exit(
1600 TosState state, NotifyMethodExitMode mode) { 1608 TosState state, NotifyMethodExitMode mode) {