< prev index next >

src/hotspot/cpu/arm/templateTable_arm.cpp

Print this page




 470   if (VerifyOops) {
 471     __ verify_oop(R0_tos);
 472   }
 473 }
 474 
 475 void TemplateTable::ldc2_w() {
 476   transition(vtos, vtos);
 477   const Register Rtags  = R2_tmp;
 478   const Register Rindex = R3_tmp;
 479   const Register Rcpool = R4_tmp;
 480   const Register Rbase  = R5_tmp;
 481 
 482   __ get_unsigned_2_byte_index_at_bcp(Rindex, 1);
 483 
 484   __ get_cpool_and_tags(Rcpool, Rtags);
 485   const int base_offset = ConstantPool::header_size() * wordSize;
 486   const int tags_offset = Array<u1>::base_offset_in_bytes();
 487 
 488   __ add(Rbase, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
 489 



 490   // get type from tags
 491   __ add(Rtemp, Rtags, tags_offset);
 492   __ ldrb(Rtemp, Address(Rtemp, Rindex));
 493 
 494   Label Condy, exit;
 495 #ifdef __ABI_HARD__
 496   Label NotDouble;
 497   __ cmp(Rtemp, JVM_CONSTANT_Double);
 498   __ b(NotDouble, ne);
 499   __ ldr_double(D0_tos, Address(Rbase, base_offset));
 500 
 501   __ push(dtos);
 502   __ b(exit);
 503   __ bind(NotDouble);
 504 #endif
 505 
 506   __ cmp(Rtemp, JVM_CONSTANT_Long);
 507   __ b(Condy, ne);
 508   __ ldr(R0_tos_lo, Address(Rbase, base_offset + 0 * wordSize));
 509   __ ldr(R1_tos_hi, Address(Rbase, base_offset + 1 * wordSize));
 510   __ push(ltos);
 511   __ b(exit);
 512 
 513   __ bind(Condy);
 514   condy_helper(exit);
 515 
 516   __ bind(exit);
 517 }
 518 
 519 
 520 void TemplateTable::condy_helper(Label& Done)
 521 {
 522   Register obj   = R0_tmp;
 523   Register rtmp  = R1_tmp;


4029     __ add(Rzero_end, Rzero_cur, Rsize);
4030 
4031     // initialize remaining object fields: Rsize was a multiple of 8
4032     { Label loop;
4033       // loop is unrolled 2 times
4034       __ bind(loop);
4035       // #1
4036       __ stmia(Rzero_cur, RegisterSet(Rzero0) | RegisterSet(Rzero1), writeback);
4037       __ cmp(Rzero_cur, Rzero_end);
4038       // #2
4039       __ stmia(Rzero_cur, RegisterSet(Rzero0) | RegisterSet(Rzero1), writeback, ne);
4040       __ cmp(Rzero_cur, Rzero_end, ne);
4041       __ b(loop, ne);
4042     }
4043 
4044     // initialize object header only.
4045     __ bind(initialize_header);
4046     if (UseBiasedLocking) {
4047       __ ldr(Rtemp, Address(Rklass, Klass::prototype_header_offset()));
4048     } else {
4049       __ mov_slow(Rtemp, (intptr_t)markWord::prototype().value());
4050     }
4051     // mark
4052     __ str(Rtemp, Address(Robj, oopDesc::mark_offset_in_bytes()));
4053 
4054     // klass
4055     __ store_klass(Rklass, Robj); // blows Rklass:
4056     Rklass = noreg;
4057 
4058     // Note: Disable DTrace runtime check for now to eliminate overhead on each allocation
4059     if (DTraceAllocProbes) {
4060       // Trigger dtrace event for fastpath
4061       Label Lcontinue;
4062 
4063       __ ldrb_global(Rtemp, (address)&DTraceAllocProbes);
4064       __ cbz(Rtemp, Lcontinue);
4065 
4066       __ push(atos);
4067       __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), Robj);
4068       __ pop(atos);
4069 




 470   if (VerifyOops) {
 471     __ verify_oop(R0_tos);
 472   }
 473 }
 474 
 475 void TemplateTable::ldc2_w() {
 476   transition(vtos, vtos);
 477   const Register Rtags  = R2_tmp;
 478   const Register Rindex = R3_tmp;
 479   const Register Rcpool = R4_tmp;
 480   const Register Rbase  = R5_tmp;
 481 
 482   __ get_unsigned_2_byte_index_at_bcp(Rindex, 1);
 483 
 484   __ get_cpool_and_tags(Rcpool, Rtags);
 485   const int base_offset = ConstantPool::header_size() * wordSize;
 486   const int tags_offset = Array<u1>::base_offset_in_bytes();
 487 
 488   __ add(Rbase, Rcpool, AsmOperand(Rindex, lsl, LogBytesPerWord));
 489 
 490   Label Condy, exit;
 491 #ifdef __ABI_HARD__
 492   Label Long;
 493   // get type from tags
 494   __ add(Rtemp, Rtags, tags_offset);
 495   __ ldrb(Rtemp, Address(Rtemp, Rindex));




 496   __ cmp(Rtemp, JVM_CONSTANT_Double);
 497   __ b(Long, ne);
 498   __ ldr_double(D0_tos, Address(Rbase, base_offset));
 499 
 500   __ push(dtos);
 501   __ b(exit);
 502   __ bind(Long);
 503 #endif
 504 
 505   __ cmp(Rtemp, JVM_CONSTANT_Long);
 506   __ b(Condy, ne);
 507   __ ldr(R0_tos_lo, Address(Rbase, base_offset + 0 * wordSize));
 508   __ ldr(R1_tos_hi, Address(Rbase, base_offset + 1 * wordSize));
 509   __ push(ltos);
 510   __ b(exit);
 511 
 512   __ bind(Condy);
 513   condy_helper(exit);
 514 
 515   __ bind(exit);
 516 }
 517 
 518 
 519 void TemplateTable::condy_helper(Label& Done)
 520 {
 521   Register obj   = R0_tmp;
 522   Register rtmp  = R1_tmp;


4028     __ add(Rzero_end, Rzero_cur, Rsize);
4029 
4030     // initialize remaining object fields: Rsize was a multiple of 8
4031     { Label loop;
4032       // loop is unrolled 2 times
4033       __ bind(loop);
4034       // #1
4035       __ stmia(Rzero_cur, RegisterSet(Rzero0) | RegisterSet(Rzero1), writeback);
4036       __ cmp(Rzero_cur, Rzero_end);
4037       // #2
4038       __ stmia(Rzero_cur, RegisterSet(Rzero0) | RegisterSet(Rzero1), writeback, ne);
4039       __ cmp(Rzero_cur, Rzero_end, ne);
4040       __ b(loop, ne);
4041     }
4042 
4043     // initialize object header only.
4044     __ bind(initialize_header);
4045     if (UseBiasedLocking) {
4046       __ ldr(Rtemp, Address(Rklass, Klass::prototype_header_offset()));
4047     } else {
4048       __ mov_slow(Rtemp, (intptr_t)markOopDesc::prototype());
4049     }
4050     // mark
4051     __ str(Rtemp, Address(Robj, oopDesc::mark_offset_in_bytes()));
4052 
4053     // klass
4054     __ store_klass(Rklass, Robj); // blows Rklass:
4055     Rklass = noreg;
4056 
4057     // Note: Disable DTrace runtime check for now to eliminate overhead on each allocation
4058     if (DTraceAllocProbes) {
4059       // Trigger dtrace event for fastpath
4060       Label Lcontinue;
4061 
4062       __ ldrb_global(Rtemp, (address)&DTraceAllocProbes);
4063       __ cbz(Rtemp, Lcontinue);
4064 
4065       __ push(atos);
4066       __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_object_alloc), Robj);
4067       __ pop(atos);
4068 


< prev index next >