< prev index next >

src/hotspot/cpu/ppc/c1_MacroAssembler_ppc.cpp

Print this page
rev 59326 : 8244949: [PPC64] Reengineer assembler stop function
Reviewed-by:


 277 void C1_MacroAssembler::initialize_object(
 278   Register obj,                        // result: pointer to object after successful allocation
 279   Register klass,                      // object klass
 280   Register var_size_in_bytes,          // object size in bytes if unknown at compile time; invalid otherwise
 281   int      con_size_in_bytes,          // object size in bytes if   known at compile time
 282   Register t1,                         // temp register
 283   Register t2                          // temp register
 284   ) {
 285   const int hdr_size_in_bytes = instanceOopDesc::header_size() * HeapWordSize;
 286 
 287   initialize_header(obj, klass, noreg, t1, t2);
 288 
 289 #ifdef ASSERT
 290   {
 291     lwz(t1, in_bytes(Klass::layout_helper_offset()), klass);
 292     if (var_size_in_bytes != noreg) {
 293       cmpw(CCR0, t1, var_size_in_bytes);
 294     } else {
 295       cmpwi(CCR0, t1, con_size_in_bytes);
 296     }
 297     asm_assert_eq("bad size in initialize_object", 0x753);
 298   }
 299 #endif
 300 
 301   // Initialize body.
 302   if (var_size_in_bytes != noreg) {
 303     // Use a loop.
 304     addi(t1, obj, hdr_size_in_bytes);                // Compute address of first element.
 305     addi(t2, var_size_in_bytes, -hdr_size_in_bytes); // Compute size of body.
 306     initialize_body(t1, t2);
 307   } else if (con_size_in_bytes > hdr_size_in_bytes) {
 308     // Use a loop.
 309     initialize_body(obj, t1, t2, con_size_in_bytes, hdr_size_in_bytes);
 310   }
 311 
 312   if (CURRENT_ENV->dtrace_alloc_probes()) {
 313     Unimplemented();
 314 //    assert(obj == O0, "must be");
 315 //    call(CAST_FROM_FN_PTR(address, Runtime1::entry_for(Runtime1::dtrace_object_alloc_id)),
 316 //         relocInfo::runtime_call_type);
 317   }




 277 void C1_MacroAssembler::initialize_object(
 278   Register obj,                        // result: pointer to object after successful allocation
 279   Register klass,                      // object klass
 280   Register var_size_in_bytes,          // object size in bytes if unknown at compile time; invalid otherwise
 281   int      con_size_in_bytes,          // object size in bytes if   known at compile time
 282   Register t1,                         // temp register
 283   Register t2                          // temp register
 284   ) {
 285   const int hdr_size_in_bytes = instanceOopDesc::header_size() * HeapWordSize;
 286 
 287   initialize_header(obj, klass, noreg, t1, t2);
 288 
 289 #ifdef ASSERT
 290   {
 291     lwz(t1, in_bytes(Klass::layout_helper_offset()), klass);
 292     if (var_size_in_bytes != noreg) {
 293       cmpw(CCR0, t1, var_size_in_bytes);
 294     } else {
 295       cmpwi(CCR0, t1, con_size_in_bytes);
 296     }
 297     asm_assert_eq("bad size in initialize_object");
 298   }
 299 #endif
 300 
 301   // Initialize body.
 302   if (var_size_in_bytes != noreg) {
 303     // Use a loop.
 304     addi(t1, obj, hdr_size_in_bytes);                // Compute address of first element.
 305     addi(t2, var_size_in_bytes, -hdr_size_in_bytes); // Compute size of body.
 306     initialize_body(t1, t2);
 307   } else if (con_size_in_bytes > hdr_size_in_bytes) {
 308     // Use a loop.
 309     initialize_body(obj, t1, t2, con_size_in_bytes, hdr_size_in_bytes);
 310   }
 311 
 312   if (CURRENT_ENV->dtrace_alloc_probes()) {
 313     Unimplemented();
 314 //    assert(obj == O0, "must be");
 315 //    call(CAST_FROM_FN_PTR(address, Runtime1::entry_for(Runtime1::dtrace_object_alloc_id)),
 316 //         relocInfo::runtime_call_type);
 317   }


< prev index next >