if (s.operator() == IA32_TRAPIF && !MIR_TrapIf.getTrapCode(s).isStackOverflow()) {       moveESPBefore(s, 0); }
  private void rewriteStackLocations() {    // ESP is initially 4 bytes above where the framepointer is going to be.    ESPOffset = getFrameFixedSize() + 4;    OPT_Register ESP = ir.regpool.getPhysicalRegisterSet().getESP();    boolean seenReturn = false;    for (OPT_InstructionEnumeration e = ir.forwardInstrEnumerator(); 	 e.hasMoreElements();) {      OPT_Instruction s = e.next();            if (s.isReturn()) {	seenReturn = true;	continue;      }      if (s.isBranch()) {	// restore ESP to home location at end of basic block.	moveESPBefore(s, 0);	continue;      }	      if (s.operator() == BBEND) {	if (seenReturn) {	  // at a return ESP will be at FrameFixedSize, 	  seenReturn = false;	  ESPOffset = 0;	} else {	  moveESPBefore(s, 0);	}	continue;      }      if (s.operator() == ADVISE_ESP) {        ESPOffset = MIR_UnaryNoRes.getVal(s).asIntConstant().value;	continue;      }      if (s.operator() == REQUIRE_ESP) {	// ESP is required to be at the given offset from the bottom of the frame	moveESPBefore(s, MIR_UnaryNoRes.getVal(s).asIntConstant().value);	continue;      }      if (s.operator() == YIELDPOINT_PROLOGUE ||	  s.operator() == YIELDPOINT_BACKEDGE ||	  s.operator() == YIELDPOINT_EPILOGUE) {	moveESPBefore(s, 0);	continue;      }      // TEMP KLUDGE. TODO: Replace me with a solution that actually       // handles all the cases!!!!!!      if (s.operator() == IA32_TRAPIF &&	  !MIR_TrapIf.getTrapCode(s).isStackOverflow()) {	// ESP must be at bottom of stack all PEIs because if the 	// hardware trap is actually taken then the code in libjvm.C that	// sets up for the return to VM_Runtime.deliverException	// is assumes that it can push parameters on the stack!	// NOTE: bottom is not always equal to 0!!!!!!!	//   (but it should be at TrapIfs).	moveESPBefore(s, 0);      }      if (s.operator() == IA32_MOV) {        rewriteMoveInstruction(s);      }      // pop computes the effective address of its operand after ESP      // is incremented.  Therefore update ESPOffset before rewriting       // stacklocation and memory operands.      if (s.operator() == IA32_POP) {	ESPOffset  += 4;       }	      for (OPT_OperandEnumeration ops = s.getOperands(); ops.hasMoreElements(); ) {        OPT_Operand op = ops.next();        if (op instanceof OPT_StackLocationOperand) {	  OPT_StackLocationOperand sop = (OPT_StackLocationOperand)op;          int offset = sop.getOffset();	  if (sop.isFromTop()) {	    offset = FPOffset2SPOffset(offset);	  }	  offset -= ESPOffset;          byte size = sop.getSize();          OPT_MemoryOperand M = 	    OPT_MemoryOperand.BD(R(ESP),offset,				 size, null, null);           s.replaceOperand(op, M);        } else if (op instanceof OPT_MemoryOperand) {	  OPT_MemoryOperand M = op.asMemory();	  if ((M.base != null && M.base.register == ESP) ||	      (M.index != null && M.index.register == ESP)) {	    M.disp -= ESPOffset;	  }	}      }      // push computes the effective address of its operand after ESP      // is decremented.  Therefore update ESPOffset after rewriting       // stacklocation and memory operands.      if (s.operator() == IA32_PUSH) {	ESPOffset -= 4;      }    }  }