431 // non-null object (String, MethodType, etc.)
432 assert_different_registers(result, tmp);
433 __ get_cache_index_at_bcp(tmp, 1, index_size);
434 __ load_resolved_reference_at_index(result, tmp);
435 __ testptr(result, result);
436 __ jcc(Assembler::notZero, resolved);
437
438 address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);
439
440 // first time invocation - must resolve first
441 __ movl(rarg, (int)bytecode());
442 __ call_VM(result, entry, rarg);
443 __ bind(resolved);
444
445 { // Check for the null sentinel.
446 // If we just called the VM, it already did the mapping for us,
447 // but it's harmless to retry.
448 Label notNull;
449 ExternalAddress null_sentinel((address)Universe::the_null_sentinel_addr());
450 __ movptr(tmp, null_sentinel);
451 __ cmpptr(tmp, result);
452 __ jccb(Assembler::notEqual, notNull);
453 __ xorptr(result, result); // NULL object reference
454 __ bind(notNull);
455 }
456
457 if (VerifyOops) {
458 __ verify_oop(result);
459 }
460 }
461
462 void TemplateTable::ldc2_w() {
463 transition(vtos, vtos);
464 Label notDouble, notLong, Done;
465 __ get_unsigned_2_byte_index_at_bcp(rbx, 1);
466
467 __ get_cpool_and_tags(rcx, rax);
468 const int base_offset = ConstantPool::header_size() * wordSize;
469 const int tags_offset = Array<u1>::base_offset_in_bytes();
470
471 // get type
|
431 // non-null object (String, MethodType, etc.)
432 assert_different_registers(result, tmp);
433 __ get_cache_index_at_bcp(tmp, 1, index_size);
434 __ load_resolved_reference_at_index(result, tmp);
435 __ testptr(result, result);
436 __ jcc(Assembler::notZero, resolved);
437
438 address entry = CAST_FROM_FN_PTR(address, InterpreterRuntime::resolve_ldc);
439
440 // first time invocation - must resolve first
441 __ movl(rarg, (int)bytecode());
442 __ call_VM(result, entry, rarg);
443 __ bind(resolved);
444
445 { // Check for the null sentinel.
446 // If we just called the VM, it already did the mapping for us,
447 // but it's harmless to retry.
448 Label notNull;
449 ExternalAddress null_sentinel((address)Universe::the_null_sentinel_addr());
450 __ movptr(tmp, null_sentinel);
451 __ cmpoop(tmp, result);
452 __ jccb(Assembler::notEqual, notNull);
453 __ xorptr(result, result); // NULL object reference
454 __ bind(notNull);
455 }
456
457 if (VerifyOops) {
458 __ verify_oop(result);
459 }
460 }
461
462 void TemplateTable::ldc2_w() {
463 transition(vtos, vtos);
464 Label notDouble, notLong, Done;
465 __ get_unsigned_2_byte_index_at_bcp(rbx, 1);
466
467 __ get_cpool_and_tags(rcx, rax);
468 const int base_offset = ConstantPool::header_size() * wordSize;
469 const int tags_offset = Array<u1>::base_offset_in_bytes();
470
471 // get type
|