3595 3596 // Outdated feature, and we don't support it. 3597 void TemplateTable::fast_invokevfinal(int byte_no) { 3598 transition(vtos, vtos); 3599 assert(byte_no == f2_byte, "use this argument"); 3600 __ stop("fast_invokevfinal not used on linuxs390x"); 3601 } 3602 3603 void TemplateTable::invokeinterface(int byte_no) { 3604 transition(vtos, vtos); 3605 3606 assert(byte_no == f1_byte, "use this argument"); 3607 Register klass = Z_ARG2, 3608 method = Z_ARG3, 3609 interface = Z_ARG4, 3610 flags = Z_ARG5, 3611 receiver = Z_tmp_1; 3612 3613 BLOCK_COMMENT("invokeinterface {"); 3614 3615 prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 itable index. 3616 receiver, flags); 3617 3618 // Z_R14 (== Z_bytecode) : return entry 3619 3620 // Special case of invokeinterface called for virtual method of 3621 // java.lang.Object. See cpCacheOop.cpp for details. 3622 // This code isn't produced by javac, but could be produced by 3623 // another compliant java compiler. 3624 NearLabel notMethod, no_such_interface, no_such_method; 3625 __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift); 3626 __ z_brz(notMethod); 3627 invokevirtual_helper(method, receiver, flags); 3628 __ bind(notMethod); 3629 3630 // Get receiver klass into klass - also a null check. 3631 __ restore_locals(); 3632 __ load_klass(klass, receiver); 3633 3634 __ lookup_interface_method(klass, interface, noreg, noreg, /*temp*/Z_ARG1, 3635 no_such_interface, /*return_method=*/false); 3636 3637 // Profile this call. 3638 __ profile_virtual_call(klass, Z_ARG1/*mdp*/, flags/*scratch*/); 3639 3640 // Find entry point to call. 3641 3642 // Get declaring interface class from method 3643 __ z_lg(interface, Address(method, Method::const_offset())); 3644 __ z_lg(interface, Address(interface, ConstMethod::constants_offset())); 3645 __ z_lg(interface, Address(interface, ConstantPool::pool_holder_offset_in_bytes())); 3646 3647 // Get itable index from method 3648 Register index = receiver, | 3595 3596 // Outdated feature, and we don't support it. 3597 void TemplateTable::fast_invokevfinal(int byte_no) { 3598 transition(vtos, vtos); 3599 assert(byte_no == f2_byte, "use this argument"); 3600 __ stop("fast_invokevfinal not used on linuxs390x"); 3601 } 3602 3603 void TemplateTable::invokeinterface(int byte_no) { 3604 transition(vtos, vtos); 3605 3606 assert(byte_no == f1_byte, "use this argument"); 3607 Register klass = Z_ARG2, 3608 method = Z_ARG3, 3609 interface = Z_ARG4, 3610 flags = Z_ARG5, 3611 receiver = Z_tmp_1; 3612 3613 BLOCK_COMMENT("invokeinterface {"); 3614 3615 prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 Method*. 3616 receiver, flags); 3617 3618 // Z_R14 (== Z_bytecode) : return entry 3619 3620 // First check for Object case, then private interface method, 3621 // then regular interface method. 3622 3623 // Special case of invokeinterface called for virtual method of 3624 // java.lang.Object. See cpCache.cpp for details. 3625 NearLabel notObjectMethod, no_such_method; 3626 __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift); 3627 __ z_brz(notObjectMethod); 3628 invokevirtual_helper(method, receiver, flags); 3629 __ bind(notObjectMethod); 3630 3631 // Check for private method invocation - indicated by vfinal 3632 NearLabel notVFinal; 3633 __ testbit(flags, ConstantPoolCacheEntry::is_vfinal_shift); 3634 __ z_brz(notVFinal); 3635 3636 // Get receiver klass into klass - also a null check. 3637 __ load_klass(klass, receiver); 3638 3639 NearLabel subtype, no_such_interface; 3640 3641 __ check_klass_subtype(klass, interface, Z_tmp_2, Z_temp_3, subtype); 3642 // If we get here the typecheck failed 3643 __ z_bru(no_such_interface); 3644 __ bind(subtype); 3645 3646 // do the call 3647 __ profile_final_call(Z_tmp_2); 3648 __ profile_arguments_type(Z_tmp_2, method, Z_ARG5, true); 3649 __ jump_from_interpreted(method, Z_tmp_2); 3650 3651 __ bind(notVFinal); 3652 3653 // Get receiver klass into klass - also a null check. 3654 __ restore_locals(); 3655 __ load_klass(klass, receiver); 3656 3657 __ lookup_interface_method(klass, interface, noreg, noreg, /*temp*/Z_ARG1, 3658 no_such_interface, /*return_method=*/false); 3659 3660 // Profile this call. 3661 __ profile_virtual_call(klass, Z_ARG1/*mdp*/, flags/*scratch*/); 3662 3663 // Find entry point to call. 3664 3665 // Get declaring interface class from method 3666 __ z_lg(interface, Address(method, Method::const_offset())); 3667 __ z_lg(interface, Address(interface, ConstMethod::constants_offset())); 3668 __ z_lg(interface, Address(interface, ConstantPool::pool_holder_offset_in_bytes())); 3669 3670 // Get itable index from method 3671 Register index = receiver, |