size += 3; break;
return 3; case IA32_CALL_opcode: OPT_Operand target = MIR_Call.getTarget(inst); if (isImmOrLabel(target)) { return 5; } else { return 2 + operandCost(target, false); }
  private static int estimateSize(OPT_Instruction inst) {    int size = 0;    switch (inst.getOpcode()) {      case LABEL_opcode:case BBEND_opcode:case UNINT_BEGIN_opcode:case UNINT_END_opcode:        // these generate no code        break;        // Generated from the same case in VM_Assembler      case IA32_ADC_opcode:case IA32_ADD_opcode:case IA32_AND_opcode:      case IA32_OR_opcode:case IA32_SBB_opcode:      case IA32_XOR_opcode:        size += 2; // opcode + modr/m        size += operandCost(MIR_BinaryAcc.getResult(inst), true);        size += operandCost(MIR_BinaryAcc.getValue(inst), true);        break;      case IA32_CMP_opcode:        size += 2; // opcode + modr/m        size += operandCost(MIR_Compare.getVal1(inst), true);        size += operandCost(MIR_Compare.getVal2(inst), true);        break;      case IA32_TEST_opcode:        size += 2; // opcode + modr/m        size += operandCost(MIR_Test.getVal1(inst), true);        size += operandCost(MIR_Test.getVal2(inst), true);        break;              case IA32_PUSH_opcode:        {          OPT_Operand op = MIR_UnaryNoRes.getVal(inst);          if (op instanceof OPT_RegisterOperand) {            size += 1;          } else if (op instanceof OPT_IntConstantOperand) {            if (fits(((OPT_IntConstantOperand)op).value,8)) {              size += 2;            } else {              size += 5;            }          } else {            size += (2+operandCost(op, true));          }        }        break;      case IA32_MOV_opcode:        size += 2; // opcode + modr/m        size += operandCost(MIR_Move.getResult(inst), false);        size += operandCost(MIR_Move.getValue(inst), false);        break;      case IA32_OFFSET_opcode:        size += 4;        break;      case IA32_JCC_opcode: case IA32_JMP_opcode:        size += 6; // assume long form        break;      case IA32_LOCK_opcode:        size += 1;        break;      case IG_PATCH_POINT_opcode:        size += 6;        break;      case IA32_INT_opcode:        size += 2;        break;      case IA32_RET_opcode:        size += 3;        break;      default:        size += 3; // 2 bytes opcode + 1 byte modr/m        for (OPT_OperandEnumeration opEnum = inst.getRootOperands();             opEnum.hasMoreElements();) {          OPT_Operand op = opEnum.next();          size += operandCost(op, false);        }        break;      }    return size;  }