< prev index next >

src/hotspot/cpu/aarch64/templateTable_aarch64.cpp

Print this page

 335   const int tags_offset = Array<u1>::base_offset_in_bytes();
 336 
 337   // get type
 338   __ add(r3, r1, tags_offset);
 339   __ lea(r3, Address(r0, r3));
 340   __ ldarb(r3, r3);
 341 
 342   // unresolved class - get the resolved class
 343   __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClass);
 344   __ br(Assembler::EQ, call_ldc);
 345 
 346   // unresolved class in error state - call into runtime to throw the error
 347   // from the first resolution attempt
 348   __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClassInError);
 349   __ br(Assembler::EQ, call_ldc);
 350 
 351   // resolved class - need to call vm to get java mirror of the class
 352   __ cmp(r3, (u1)JVM_CONSTANT_Class);
 353   __ br(Assembler::NE, notClass);
 354 












 355   __ bind(call_ldc);
 356   __ mov(c_rarg1, is_ldc_wide(type) ? 1 : 0);
 357   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), c_rarg1);
 358   __ push_ptr(r0);
 359   __ verify_oop(r0);
 360   __ b(Done);
 361 
 362   __ bind(notClass);
 363   __ cmp(r3, (u1)JVM_CONSTANT_Float);
 364   __ br(Assembler::NE, notFloat);
 365   // ftos
 366   __ adds(r1, r2, r1, Assembler::LSL, 3);
 367   __ ldrs(v0, Address(r1, base_offset));
 368   __ push_f();
 369   __ b(Done);
 370 
 371   __ bind(notFloat);
 372 
 373   __ cmp(r3, (u1)JVM_CONSTANT_Integer);
 374   __ br(Assembler::NE, notInt);

 335   const int tags_offset = Array<u1>::base_offset_in_bytes();
 336 
 337   // get type
 338   __ add(r3, r1, tags_offset);
 339   __ lea(r3, Address(r0, r3));
 340   __ ldarb(r3, r3);
 341 
 342   // unresolved class - get the resolved class
 343   __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClass);
 344   __ br(Assembler::EQ, call_ldc);
 345 
 346   // unresolved class in error state - call into runtime to throw the error
 347   // from the first resolution attempt
 348   __ cmp(r3, (u1)JVM_CONSTANT_UnresolvedClassInError);
 349   __ br(Assembler::EQ, call_ldc);
 350 
 351   // resolved class - need to call vm to get java mirror of the class
 352   __ cmp(r3, (u1)JVM_CONSTANT_Class);
 353   __ br(Assembler::NE, notClass);
 354 
 355   __ load_resolved_klass_at_offset(r2, r1, r3, rscratch1); // kills r3=tag
 356 
 357   __ cmp(r3, zr); // resolved_klass ?= null
 358   __ br(Assembler::EQ, call_ldc);
 359 
 360   const int mirror_offset = in_bytes(Klass::java_mirror_offset());
 361   __ ldr(r3, Address(r3, mirror_offset));
 362   __ resolve_oop_handle(r3, rscratch1, rscratch2);
 363   __ push_ptr(r3);
 364 
 365   __ b(Done);
 366 
 367   __ bind(call_ldc);
 368   __ mov(c_rarg1, is_ldc_wide(type) ? 1 : 0);
 369   call_VM(r0, CAST_FROM_FN_PTR(address, InterpreterRuntime::ldc), c_rarg1);
 370   __ push_ptr(r0);
 371   __ verify_oop(r0);
 372   __ b(Done);
 373 
 374   __ bind(notClass);
 375   __ cmp(r3, (u1)JVM_CONSTANT_Float);
 376   __ br(Assembler::NE, notFloat);
 377   // ftos
 378   __ adds(r1, r2, r1, Assembler::LSL, 3);
 379   __ ldrs(v0, Address(r1, base_offset));
 380   __ push_f();
 381   __ b(Done);
 382 
 383   __ bind(notFloat);
 384 
 385   __ cmp(r3, (u1)JVM_CONSTANT_Integer);
 386   __ br(Assembler::NE, notInt);
< prev index next >