265 movl(rcx, Address(rdi, arrayOopDesc::length_offset_in_bytes())); |
265 movl(rcx, Address(rdi, arrayOopDesc::length_offset_in_bytes())); |
266 // Skip to start of data; also clear Z flag incase rcx is zero |
266 // Skip to start of data; also clear Z flag incase rcx is zero |
267 addq(rdi, arrayOopDesc::base_offset_in_bytes(T_OBJECT)); |
267 addq(rdi, arrayOopDesc::base_offset_in_bytes(T_OBJECT)); |
268 // Scan rcx words at [rdi] for occurance of rax |
268 // Scan rcx words at [rdi] for occurance of rax |
269 // Set NZ/Z based on last compare |
269 // Set NZ/Z based on last compare |
270 repne_scan(); |
270 |
271 // Not equal? |
271 // this part is kind tricky, as values in supers array could be 32 or 64 bit wide |
272 jcc(Assembler::notEqual, not_subtype); |
272 // and we store values in objArrays always encoded, thus we need to encode value |
|
273 // before repne |
|
274 if (UseCompressedOops) { |
|
275 encode_heap_oop(rax); |
|
276 repne_scanl(); |
|
277 // Not equal? |
|
278 jcc(Assembler::notEqual, not_subtype); |
|
279 // decode heap oop here for movq |
|
280 decode_heap_oop(rax); |
|
281 } else { |
|
282 repne_scanq(); |
|
283 jcc(Assembler::notEqual, not_subtype); |
|
284 } |
273 // Must be equal but missed in cache. Update cache. |
285 // Must be equal but missed in cache. Update cache. |
274 movq(Address(Rsub_klass, sizeof(oopDesc) + |
286 movq(Address(Rsub_klass, sizeof(oopDesc) + |
275 Klass::secondary_super_cache_offset_in_bytes()), rax); |
287 Klass::secondary_super_cache_offset_in_bytes()), rax); |
276 jmp(ok_is_subtype); |
288 jmp(ok_is_subtype); |
277 |
289 |
278 bind(not_subtype); |
290 bind(not_subtype); |
|
291 // decode heap oop here for miss |
|
292 if (UseCompressedOops) decode_heap_oop(rax); |
279 profile_typecheck_failed(rcx); // blows rcx |
293 profile_typecheck_failed(rcx); // blows rcx |
280 } |
294 } |
281 |
295 |
282 |
296 |
283 // Java Expression Stack |
297 // Java Expression Stack |