comparison src/cpu/x86/vm/interp_masm_x86_64.cpp @ 344:6aae2f9d0294

Merge
author ysr
date Thu, 12 Jun 2008 13:50:55 -0700
parents 37f87013dfd8 6d172e3548cb
children 1ee8caae33af
comparison
equal deleted inserted replaced
342:37f87013dfd8 344:6aae2f9d0294
221 assert(Rsub_klass != r14, "r14 holds locals"); 221 assert(Rsub_klass != r14, "r14 holds locals");
222 assert(Rsub_klass != r13, "r13 holds bcp"); 222 assert(Rsub_klass != r13, "r13 holds bcp");
223 assert(Rsub_klass != rcx, "rcx holds 2ndary super array length"); 223 assert(Rsub_klass != rcx, "rcx holds 2ndary super array length");
224 assert(Rsub_klass != rdi, "rdi holds 2ndary super array scan ptr"); 224 assert(Rsub_klass != rdi, "rdi holds 2ndary super array scan ptr");
225 225
226 Label not_subtype, loop; 226 Label not_subtype, not_subtype_pop, loop;
227 227
228 // Profile the not-null value's klass. 228 // Profile the not-null value's klass.
229 profile_typecheck(rcx, Rsub_klass, rdi); // blows rcx, rdi 229 profile_typecheck(rcx, Rsub_klass, rdi); // blows rcx, rdi
230 230
231 // Load the super-klass's check offset into rcx 231 // Load the super-klass's check offset into rcx
260 260
261 // this part is kind tricky, as values in supers array could be 32 or 64 bit wide 261 // this part is kind tricky, as values in supers array could be 32 or 64 bit wide
262 // and we store values in objArrays always encoded, thus we need to encode value 262 // and we store values in objArrays always encoded, thus we need to encode value
263 // before repne 263 // before repne
264 if (UseCompressedOops) { 264 if (UseCompressedOops) {
265 pushq(rax);
265 encode_heap_oop(rax); 266 encode_heap_oop(rax);
266 repne_scanl(); 267 repne_scanl();
267 // Not equal? 268 // Not equal?
268 jcc(Assembler::notEqual, not_subtype); 269 jcc(Assembler::notEqual, not_subtype_pop);
269 // decode heap oop here for movq 270 // restore heap oop here for movq
270 decode_heap_oop(rax); 271 popq(rax);
271 } else { 272 } else {
272 repne_scanq(); 273 repne_scanq();
273 jcc(Assembler::notEqual, not_subtype); 274 jcc(Assembler::notEqual, not_subtype);
274 } 275 }
275 // Must be equal but missed in cache. Update cache. 276 // Must be equal but missed in cache. Update cache.
276 movq(Address(Rsub_klass, sizeof(oopDesc) + 277 movq(Address(Rsub_klass, sizeof(oopDesc) +
277 Klass::secondary_super_cache_offset_in_bytes()), rax); 278 Klass::secondary_super_cache_offset_in_bytes()), rax);
278 jmp(ok_is_subtype); 279 jmp(ok_is_subtype);
279 280
281 bind(not_subtype_pop);
282 // restore heap oop here for miss
283 if (UseCompressedOops) popq(rax);
280 bind(not_subtype); 284 bind(not_subtype);
281 // decode heap oop here for miss
282 if (UseCompressedOops) decode_heap_oop(rax);
283 profile_typecheck_failed(rcx); // blows rcx 285 profile_typecheck_failed(rcx); // blows rcx
284 } 286 }
285 287
286 288
287 // Java Expression Stack 289 // Java Expression Stack