comparison src/cpu/sparc/vm/templateTable_sparc.cpp @ 4771:22cee0ee8927

Merge
author kvn
date Fri, 06 Jan 2012 20:09:20 -0800
parents 52b5d32fbfaf 069ab3f976d3
children 1d7922586cf6
comparison
equal deleted inserted replaced
4755:2b3acb34791f 4771:22cee0ee8927
886 __ load_klass(O3, O4); // get array klass 886 __ load_klass(O3, O4); // get array klass
887 __ load_klass(Otos_i, O5); // get value klass 887 __ load_klass(Otos_i, O5); // get value klass
888 888
889 // do fast instanceof cache test 889 // do fast instanceof cache test
890 890
891 __ ld_ptr(O4, sizeof(oopDesc) + objArrayKlass::element_klass_offset_in_bytes(), O4); 891 __ ld_ptr(O4, in_bytes(objArrayKlass::element_klass_offset()), O4);
892 892
893 assert(Otos_i == O0, "just checking"); 893 assert(Otos_i == O0, "just checking");
894 894
895 // Otos_i: value 895 // Otos_i: value
896 // O1: addr - offset 896 // O1: addr - offset
2029 assert(state == vtos, "only valid state"); 2029 assert(state == vtos, "only valid state");
2030 __ mov(G0, G3_scratch); 2030 __ mov(G0, G3_scratch);
2031 __ access_local_ptr(G3_scratch, Otos_i); 2031 __ access_local_ptr(G3_scratch, Otos_i);
2032 __ load_klass(Otos_i, O2); 2032 __ load_klass(Otos_i, O2);
2033 __ set(JVM_ACC_HAS_FINALIZER, G3); 2033 __ set(JVM_ACC_HAS_FINALIZER, G3);
2034 __ ld(O2, Klass::access_flags_offset_in_bytes() + sizeof(oopDesc), O2); 2034 __ ld(O2, in_bytes(Klass::access_flags_offset()), O2);
2035 __ andcc(G3, O2, G0); 2035 __ andcc(G3, O2, G0);
2036 Label skip_register_finalizer; 2036 Label skip_register_finalizer;
2037 __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer); 2037 __ br(Assembler::zero, false, Assembler::pn, skip_register_finalizer);
2038 __ delayed()->nop(); 2038 __ delayed()->nop();
2039 2039
3348 //__ sll(Roffset, LogBytesPerWord, Roffset); // executed in delay slot 3348 //__ sll(Roffset, LogBytesPerWord, Roffset); // executed in delay slot
3349 __ add(Roffset, sizeof(constantPoolOopDesc), Roffset); 3349 __ add(Roffset, sizeof(constantPoolOopDesc), Roffset);
3350 __ ld_ptr(Rscratch, Roffset, RinstanceKlass); 3350 __ ld_ptr(Rscratch, Roffset, RinstanceKlass);
3351 3351
3352 // make sure klass is fully initialized: 3352 // make sure klass is fully initialized:
3353 __ ldub(RinstanceKlass, instanceKlass::init_state_offset_in_bytes() + sizeof(oopDesc), G3_scratch); 3353 __ ldub(RinstanceKlass, in_bytes(instanceKlass::init_state_offset()), G3_scratch);
3354 __ cmp(G3_scratch, instanceKlass::fully_initialized); 3354 __ cmp(G3_scratch, instanceKlass::fully_initialized);
3355 __ br(Assembler::notEqual, false, Assembler::pn, slow_case); 3355 __ br(Assembler::notEqual, false, Assembler::pn, slow_case);
3356 __ delayed()->ld(RinstanceKlass, Klass::layout_helper_offset_in_bytes() + sizeof(oopDesc), Roffset); 3356 __ delayed()->ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset);
3357 3357
3358 // get instance_size in instanceKlass (already aligned) 3358 // get instance_size in instanceKlass (already aligned)
3359 //__ ld(RinstanceKlass, Klass::layout_helper_offset_in_bytes() + sizeof(oopDesc), Roffset); 3359 //__ ld(RinstanceKlass, in_bytes(Klass::layout_helper_offset()), Roffset);
3360 3360
3361 // make sure klass does not have has_finalizer, or is abstract, or interface or java/lang/Class 3361 // make sure klass does not have has_finalizer, or is abstract, or interface or java/lang/Class
3362 __ btst(Klass::_lh_instance_slow_path_bit, Roffset); 3362 __ btst(Klass::_lh_instance_slow_path_bit, Roffset);
3363 __ br(Assembler::notZero, false, Assembler::pn, slow_case); 3363 __ br(Assembler::notZero, false, Assembler::pn, slow_case);
3364 __ delayed()->nop(); 3364 __ delayed()->nop();
3481 3481
3482 // Initialize the header: mark, klass 3482 // Initialize the header: mark, klass
3483 __ bind(initialize_header); 3483 __ bind(initialize_header);
3484 3484
3485 if (UseBiasedLocking) { 3485 if (UseBiasedLocking) {
3486 __ ld_ptr(RinstanceKlass, Klass::prototype_header_offset_in_bytes() + sizeof(oopDesc), G4_scratch); 3486 __ ld_ptr(RinstanceKlass, in_bytes(Klass::prototype_header_offset()), G4_scratch);
3487 } else { 3487 } else {
3488 __ set((intptr_t)markOopDesc::prototype(), G4_scratch); 3488 __ set((intptr_t)markOopDesc::prototype(), G4_scratch);
3489 } 3489 }
3490 __ st_ptr(G4_scratch, RallocatedObject, oopDesc::mark_offset_in_bytes()); // mark 3490 __ st_ptr(G4_scratch, RallocatedObject, oopDesc::mark_offset_in_bytes()); // mark
3491 __ store_klass_gap(G0, RallocatedObject); // klass gap if compressed 3491 __ store_klass_gap(G0, RallocatedObject); // klass gap if compressed