OPT_Instruction nextInstr = s.nextInstructionInCodeOrder();
  private static OPT_Instruction yield_point(OPT_Instruction s, OPT_IR ir) {    s.insertBefore(MIR_UnaryNoRes.create(REQUIRE_ESP, I(0)));        OPT_Instruction nextInstr = s.nextInstructionInCodeOrder();    // get the correct method to be called for a thread switch    VM_Method meth = null;    if (s.getOpcode() == YIELDPOINT_PROLOGUE_opcode) {      meth = VM_OptLinker.optThreadSwitchFromPrologueMethod;    } else if (s.getOpcode() == YIELDPOINT_EPILOGUE_opcode) {      meth = VM_OptLinker.optThreadSwitchFromEpilogueMethod;    } else {       meth = VM_OptLinker.optThreadSwitchFromBackedgeMethod;    }    // split the basic block after the yieldpoint    OPT_BasicBlock thisBlock = s.getBasicBlock();    OPT_BasicBlock nextBlock = thisBlock.splitNodeWithLinksAt(s,ir);        // create a basic block at the end of the IR to hold the yieldpoint       OPT_BasicBlock yieldpoint = thisBlock.createSubBlock(s.bcIndex, ir);    thisBlock.insertOut(yieldpoint);    yieldpoint.insertOut(nextBlock);    ir.cfg.addLastInCodeOrder(yieldpoint);        int offset = meth.getOffset();    OPT_LocationOperand loc = new OPT_LocationOperand(offset);    OPT_Operand guard = TG();    OPT_Operand target;    if (ir.options.FIXED_JTOC) {      target = OPT_MemoryOperand.D(offset + VM_Magic.objectAsAddress(VM_Magic.getJTOC()),				   (byte)4, loc, guard);    } else {      OPT_Operand jtoc = 	OPT_MemoryOperand.BD(R(ir.regpool.getPhysicalRegisterSet().getPR()),			     VM_Entrypoints.jtocOffset, 			     (byte)4, null, TG());      OPT_RegisterOperand regOp = ir.regpool.makeTempInt();      yieldpoint.appendInstruction(MIR_Move.create(IA32_MOV, regOp, jtoc));      target =	OPT_MemoryOperand.BD(regOp.copyD2U(), 			     offset, (byte)4, loc, guard);    }    // call thread switch    OPT_Instruction call =       MIR_Call.create0(CALL_SAVE_VOLATILE, null, null, target, 		       OPT_MethodOperand.STATIC(meth));    call.markAsNonPEI();    call.copyPosition(s);    yieldpoint.appendInstruction(call);    yieldpoint.appendInstruction(MIR_Branch.create(IA32_JMP,						   nextBlock.makeJumpTarget()));         // Check to see if threadSwitch requested    OPT_Register PR = ir.regpool.getPhysicalRegisterSet().getPR();    int tsr = VM_Entrypoints.threadSwitchRequestedOffset;    OPT_MemoryOperand M = OPT_MemoryOperand.BD(R(PR),tsr,(byte)4,null,null);    OPT_Instruction compare = MIR_Compare.create(IA32_CMP, M, I(0));    s.insertBefore(compare);    MIR_CondBranch.mutate(s, IA32_JCC, OPT_IA32ConditionOperand.NE(),			  yieldpoint.makeJumpTarget(),			  OPT_BranchProfileOperand.unlikely());    return nextInstr;  }