3239 __ ldub(G3_scratch, Roffset, G3_scratch); |
3239 __ ldub(G3_scratch, Roffset, G3_scratch); |
3240 __ cmp(G3_scratch, JVM_CONSTANT_Class); |
3240 __ cmp(G3_scratch, JVM_CONSTANT_Class); |
3241 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); |
3241 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); |
3242 __ delayed()->sll(Roffset, LogBytesPerWord, Roffset); |
3242 __ delayed()->sll(Roffset, LogBytesPerWord, Roffset); |
3243 // get InstanceKlass |
3243 // get InstanceKlass |
3244 //__ sll(Roffset, LogBytesPerWord, Roffset); // executed in delay slot |
3244 __ load_resolved_klass_at_offset(Rscratch, Roffset, RinstanceKlass); |
3245 __ add(Roffset, sizeof(ConstantPool), Roffset); |
|
3246 __ ld_ptr(Rscratch, Roffset, RinstanceKlass); |
|
3247 |
3245 |
3248 // make sure klass is fully initialized: |
3246 // make sure klass is fully initialized: |
3249 __ ldub(RinstanceKlass, in_bytes(InstanceKlass::init_state_offset()), G3_scratch); |
3247 __ ldub(RinstanceKlass, in_bytes(InstanceKlass::init_state_offset()), G3_scratch); |
3250 __ cmp(G3_scratch, InstanceKlass::fully_initialized); |
3248 __ cmp(G3_scratch, InstanceKlass::fully_initialized); |
3251 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); |
3249 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); |
3463 |
3461 |
3464 __ ba_short(resolved); |
3462 __ ba_short(resolved); |
3465 |
3463 |
3466 // Extract target class from constant pool |
3464 // Extract target class from constant pool |
3467 __ bind(quicked); |
3465 __ bind(quicked); |
3468 __ add(Roffset, sizeof(ConstantPool), Roffset); |
3466 __ load_resolved_klass_at_offset(Lscratch, Roffset, RspecifiedKlass); |
3469 __ ld_ptr(Lscratch, Roffset, RspecifiedKlass); |
3467 |
|
3468 |
3470 __ bind(resolved); |
3469 __ bind(resolved); |
3471 __ load_klass(Otos_i, RobjKlass); // get value klass |
3470 __ load_klass(Otos_i, RobjKlass); // get value klass |
3472 |
3471 |
3473 // Generate a fast subtype check. Branch to cast_ok if no |
3472 // Generate a fast subtype check. Branch to cast_ok if no |
3474 // failure. Throw exception if failure. |
3473 // failure. Throw exception if failure. |
3520 |
3519 |
3521 __ ba_short(resolved); |
3520 __ ba_short(resolved); |
3522 |
3521 |
3523 // Extract target class from constant pool |
3522 // Extract target class from constant pool |
3524 __ bind(quicked); |
3523 __ bind(quicked); |
3525 __ add(Roffset, sizeof(ConstantPool), Roffset); |
|
3526 __ get_constant_pool(Lscratch); |
3524 __ get_constant_pool(Lscratch); |
3527 __ ld_ptr(Lscratch, Roffset, RspecifiedKlass); |
3525 __ load_resolved_klass_at_offset(Lscratch, Roffset, RspecifiedKlass); |
|
3526 |
3528 __ bind(resolved); |
3527 __ bind(resolved); |
3529 __ load_klass(Otos_i, RobjKlass); // get value klass |
3528 __ load_klass(Otos_i, RobjKlass); // get value klass |
3530 |
3529 |
3531 // Generate a fast subtype check. Branch to cast_ok if no |
3530 // Generate a fast subtype check. Branch to cast_ok if no |
3532 // failure. Return 0 if failure. |
3531 // failure. Return 0 if failure. |