comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 625:2f2f54ed12ce

Merge
author kvn
date Tue, 10 Mar 2009 08:52:16 -0700
parents afa80fa86d22 56aae7be60d4
children 7bb995fbd3c0 c517646eef23
comparison
equal deleted inserted replaced
620:bcedf688d882 625:2f2f54ed12ce
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