--- old/src/hotspot/cpu/s390/templateTable_s390.cpp 2018-05-18 03:20:20.018308879 -0400 +++ new/src/hotspot/cpu/s390/templateTable_s390.cpp 2018-05-18 03:20:18.478219426 -0400 @@ -3612,20 +3612,43 @@ BLOCK_COMMENT("invokeinterface {"); - prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 itable index. + prepare_invoke(byte_no, interface, method, // Get f1 klassOop, f2 Method*. receiver, flags); // Z_R14 (== Z_bytecode) : return entry + // First check for Object case, then private interface method, + // then regular interface method. + // Special case of invokeinterface called for virtual method of - // java.lang.Object. See cpCacheOop.cpp for details. - // This code isn't produced by javac, but could be produced by - // another compliant java compiler. - NearLabel notMethod, no_such_interface, no_such_method; + // java.lang.Object. See cpCache.cpp for details. + NearLabel notObjectMethod, no_such_method; __ testbit(flags, ConstantPoolCacheEntry::is_forced_virtual_shift); - __ z_brz(notMethod); + __ z_brz(notObjectMethod); invokevirtual_helper(method, receiver, flags); - __ bind(notMethod); + __ bind(notObjectMethod); + + // Check for private method invocation - indicated by vfinal + NearLabel notVFinal; + __ testbit(flags, ConstantPoolCacheEntry::is_vfinal_shift); + __ z_brz(notVFinal); + + // Get receiver klass into klass - also a null check. + __ load_klass(klass, receiver); + + NearLabel subtype, no_such_interface; + + __ check_klass_subtype(klass, interface, Z_tmp_2, Z_temp_3, subtype); + // If we get here the typecheck failed + __ z_bru(no_such_interface); + __ bind(subtype); + + // do the call + __ profile_final_call(Z_tmp_2); + __ profile_arguments_type(Z_tmp_2, method, Z_ARG5, true); + __ jump_from_interpreted(method, Z_tmp_2); + + __ bind(notVFinal); // Get receiver klass into klass - also a null check. __ restore_locals();