asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.unresolvedInvokeinterfaceImplementsTestMethod.getOffset());
asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.unresolvedInvokeinterfaceImplementsTestMethod.getOffsetAsInt());
  protected final void emit_invokeinterface(VM_MethodReference methodRef) {    int count = methodRef.getParameterWords() + 1; // +1 for "this" parameter    VM_Method resolvedMethod = null;    resolvedMethod = methodRef.peekInterfaceMethod();    // (1) Emit dynamic type checking sequence if required to do so inline.    if (VM.BuildForIMTInterfaceInvocation ||         (VM.BuildForITableInterfaceInvocation && VM.DirectlyIndexedITables)) {      if (resolvedMethod == null) {        // Can't successfully resolve it at compile time.        // Call uncommon case typechecking routine to do the right thing when this code actually executes.        asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2);                       // "this" object        asm.emitPUSH_Imm(methodRef.getId());                                    // dict id of target        VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T1);        asm.emitPUSH_Reg(S0);        genParameterRegisterLoad(2);                                            // pass 2 parameter word        asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.unresolvedInvokeinterfaceImplementsTestMethod.getOffset());// check that "this" class implements the interface      } else {        asm.emitMOV_Reg_RegDisp (T0, JTOC, resolvedMethod.getDeclaringClass().getTibOffset()); // tib of the interface method        asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2);                                 // "this" object        asm.emitPUSH_RegDisp(T0, TIB_TYPE_INDEX << 2);                                    // type of the interface method        VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T1);        asm.emitPUSH_Reg(S0);        genParameterRegisterLoad(2);                                          // pass 2 parameter word        asm.emitCALL_RegDisp(JTOC, VM_Entrypoints.invokeinterfaceImplementsTestMethod.getOffset());// check that "this" class implements the interface      }    }    // (2) Emit interface invocation sequence.    if (VM.BuildForIMTInterfaceInvocation) {      VM_InterfaceMethodSignature sig = VM_InterfaceMethodSignature.findOrCreate(methodRef);      int offset = sig.getIMTOffset();                // squirrel away signature ID      VM_ProcessorLocalState.emitMoveImmToField(asm,                                                 VM_Entrypoints.hiddenSignatureIdField.getOffset(),                                                sig.getId());      asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2);                                  // "this" object      VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T1);      if (VM.BuildForIndirectIMT) {        // Load the IMT Base into S0        asm.emitMOV_Reg_RegDisp(S0, S0, TIB_IMT_TIB_INDEX << 2);      }      genParameterRegisterLoad(methodRef, true);      asm.emitCALL_RegDisp(S0, offset);                                             // the interface call    } else if (VM.BuildForITableInterfaceInvocation &&                VM.DirectlyIndexedITables &&                resolvedMethod != null) {      VM_Class I = resolvedMethod.getDeclaringClass();      asm.emitMOV_Reg_RegDisp (T1, SP, (count-1) << 2);                                 // "this" object      VM_ObjectModel.baselineEmitLoadTIB(asm,S0,T1);      asm.emitMOV_Reg_RegDisp (S0, S0, TIB_ITABLES_TIB_INDEX << 2);                     // iTables      asm.emitMOV_Reg_RegDisp (S0, S0, I.getInterfaceId() << 2);                        // iTable      genParameterRegisterLoad(methodRef, true);      int idx = VM_InterfaceInvocation.getITableIndex(I, methodRef.getName(), methodRef.getDescriptor());      asm.emitCALL_RegDisp(S0, idx << 2); // the interface call    } else {      int itableIndex = -1;      if (VM.BuildForITableInterfaceInvocation && resolvedMethod != null) {        // get the index of the method in the Itable        itableIndex = VM_InterfaceInvocation.getITableIndex(resolvedMethod.getDeclaringClass(),                                                             methodRef.getName(),                                                             methodRef.getDescriptor());      }      if (itableIndex == -1) {        // itable index is not known at compile-time.        // call "invokeInterface" to resolve object + method id into         // method address        int methodRefId = methodRef.getId();        asm.emitPUSH_RegDisp(SP, (count-1)<<LG_WORDSIZE);  // "this" parameter is obj        asm.emitPUSH_Imm(methodRefId);                 // id of method to call        genParameterRegisterLoad(2);               // pass 2 parameter words        asm.emitCALL_RegDisp(JTOC,  VM_Entrypoints.invokeInterfaceMethod.getOffset()); // invokeinterface(obj, id) returns address to call        asm.emitMOV_Reg_Reg (S0, T0);                      // S0 has address of method        genParameterRegisterLoad(methodRef, true);        asm.emitCALL_Reg(S0);                          // the interface method (its parameters are on stack)      } else {        // itable index is known at compile-time.        // call "findITable" to resolve object + interface id into         // itable address        asm.emitMOV_Reg_RegDisp (T0, SP, (count-1) << 2);             // "this" object        VM_ObjectModel.baselineEmitLoadTIB(asm, S0, T0);        asm.emitPUSH_Reg(S0);        asm.emitPUSH_Imm        (resolvedMethod.getDeclaringClass().getInterfaceId()); // interface id        genParameterRegisterLoad(2);                                  // pass 2 parameter words        asm.emitCALL_RegDisp    (JTOC,  VM_Entrypoints.findItableMethod.getOffset()); // findItableOffset(tib, id) returns iTable        asm.emitMOV_Reg_Reg     (S0, T0);                             // S0 has iTable        genParameterRegisterLoad(methodRef, true);        asm.emitCALL_RegDisp    (S0, itableIndex << 2);               // the interface call      }    }    genResultRegisterUnload(methodRef);  }