hotspot/src/cpu/aarch64/vm/templateTable_aarch64.cpp
changeset 34498 54f9242e3f81
parent 32596 8feecdee3156
child 35214 d86005e0b4c2
equal deleted inserted replaced
34227:001483ee066c 34498:54f9242e3f81
   384   const int base_offset = ConstantPool::header_size() * wordSize;
   384   const int base_offset = ConstantPool::header_size() * wordSize;
   385   const int tags_offset = Array<u1>::base_offset_in_bytes();
   385   const int tags_offset = Array<u1>::base_offset_in_bytes();
   386 
   386 
   387   // get type
   387   // get type
   388   __ add(r3, r1, tags_offset);
   388   __ add(r3, r1, tags_offset);
   389   __ ldrb(r3, Address(r0, r3));
   389   __ lea(r3, Address(r0, r3));
       
   390   __ ldarb(r3, r3);
   390 
   391 
   391   // unresolved class - get the resolved class
   392   // unresolved class - get the resolved class
   392   __ cmp(r3, JVM_CONSTANT_UnresolvedClass);
   393   __ cmp(r3, JVM_CONSTANT_UnresolvedClass);
   393   __ br(Assembler::EQ, call_ldc);
   394   __ br(Assembler::EQ, call_ldc);
   394 
   395 
  3314   // Make sure the class we're about to instantiate has been resolved.
  3315   // Make sure the class we're about to instantiate has been resolved.
  3315   // This is done before loading InstanceKlass to be consistent with the order
  3316   // This is done before loading InstanceKlass to be consistent with the order
  3316   // how Constant Pool is updated (see ConstantPool::klass_at_put)
  3317   // how Constant Pool is updated (see ConstantPool::klass_at_put)
  3317   const int tags_offset = Array<u1>::base_offset_in_bytes();
  3318   const int tags_offset = Array<u1>::base_offset_in_bytes();
  3318   __ lea(rscratch1, Address(r0, r3, Address::lsl(0)));
  3319   __ lea(rscratch1, Address(r0, r3, Address::lsl(0)));
  3319   __ ldrb(rscratch1, Address(rscratch1, tags_offset));
  3320   __ lea(rscratch1, Address(rscratch1, tags_offset));
       
  3321   __ ldarb(rscratch1, rscratch1);
  3320   __ cmp(rscratch1, JVM_CONSTANT_Class);
  3322   __ cmp(rscratch1, JVM_CONSTANT_Class);
  3321   __ br(Assembler::NE, slow_case);
  3323   __ br(Assembler::NE, slow_case);
  3322 
  3324 
  3323   // get InstanceKlass
  3325   // get InstanceKlass
  3324   __ lea(r4, Address(r4, r3, Address::lsl(3)));
  3326   __ lea(r4, Address(r4, r3, Address::lsl(3)));
  3458   // Get cpool & tags index
  3460   // Get cpool & tags index
  3459   __ get_cpool_and_tags(r2, r3); // r2=cpool, r3=tags array
  3461   __ get_cpool_and_tags(r2, r3); // r2=cpool, r3=tags array
  3460   __ get_unsigned_2_byte_index_at_bcp(r19, 1); // r19=index
  3462   __ get_unsigned_2_byte_index_at_bcp(r19, 1); // r19=index
  3461   // See if bytecode has already been quicked
  3463   // See if bytecode has already been quicked
  3462   __ add(rscratch1, r3, Array<u1>::base_offset_in_bytes());
  3464   __ add(rscratch1, r3, Array<u1>::base_offset_in_bytes());
  3463   __ ldrb(r1, Address(rscratch1, r19));
  3465   __ lea(r1, Address(rscratch1, r19));
       
  3466   __ ldarb(r1, r1);
  3464   __ cmp(r1, JVM_CONSTANT_Class);
  3467   __ cmp(r1, JVM_CONSTANT_Class);
  3465   __ br(Assembler::EQ, quicked);
  3468   __ br(Assembler::EQ, quicked);
  3466 
  3469 
  3467   __ push(atos); // save receiver for result, and for GC
  3470   __ push(atos); // save receiver for result, and for GC
  3468   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
  3471   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
  3512   // Get cpool & tags index
  3515   // Get cpool & tags index
  3513   __ get_cpool_and_tags(r2, r3); // r2=cpool, r3=tags array
  3516   __ get_cpool_and_tags(r2, r3); // r2=cpool, r3=tags array
  3514   __ get_unsigned_2_byte_index_at_bcp(r19, 1); // r19=index
  3517   __ get_unsigned_2_byte_index_at_bcp(r19, 1); // r19=index
  3515   // See if bytecode has already been quicked
  3518   // See if bytecode has already been quicked
  3516   __ add(rscratch1, r3, Array<u1>::base_offset_in_bytes());
  3519   __ add(rscratch1, r3, Array<u1>::base_offset_in_bytes());
  3517   __ ldrb(r1, Address(rscratch1, r19));
  3520   __ lea(r1, Address(rscratch1, r19));
       
  3521   __ ldarb(r1, r1);
  3518   __ cmp(r1, JVM_CONSTANT_Class);
  3522   __ cmp(r1, JVM_CONSTANT_Class);
  3519   __ br(Assembler::EQ, quicked);
  3523   __ br(Assembler::EQ, quicked);
  3520 
  3524 
  3521   __ push(atos); // save receiver for result, and for GC
  3525   __ push(atos); // save receiver for result, and for GC
  3522   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));
  3526   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::quicken_io_cc));