return new OPT_IntConstantOperand(val.toInt());
return new OPT_IntConstantOperand(val.toInt(), VM_Type.WordType);
  public static OPT_ConstantOperand getStaticFieldValue(VM_Field field)     throws NoSuchFieldException {    if (VM.VerifyAssertions) VM._assert(field.isStatic());    VM_Type fieldType = field.getType();    int slot = field.getOffset() >>> 2;    if (fieldType == VM_Type.AddressType) {      Object obj = getObjectStaticFieldValue(field);      VM_Address val = (VM.runningVM) ? VM_Magic.objectAsAddress(obj) : (VM_Address) obj;      return new OPT_IntConstantOperand(val.toInt(), VM_Type.AddressType);    } else if (fieldType == VM_Type.WordType) {      Object obj = getObjectStaticFieldValue(field);      VM_Word val = (VM.runningVM) ? VM_Magic.objectAsAddress(obj).toWord() : (VM_Word) obj;      return new OPT_IntConstantOperand(val.toInt());    } else if (fieldType.isIntLikeType()) {      int val = getIntStaticFieldValue(field);      return new OPT_IntConstantOperand(val);    } else if (fieldType.isLongType()) {      long val = getLongStaticFieldValue(field);      return new OPT_LongConstantOperand(val, slot);    } else if (fieldType.isFloatType()) {      float val = getFloatStaticFieldValue(field);      return new OPT_FloatConstantOperand(val, slot);    } else if (fieldType.isDoubleType()) {      double val = getDoubleStaticFieldValue(field);      return new OPT_DoubleConstantOperand(val, slot);    } else if (fieldType == VM_Type.JavaLangStringType) {      String val = (String)getObjectStaticFieldValue(field);      return new OPT_StringConstantOperand(val, slot);    } else {      // TODO: Add array and scalar reference constant operands      throw new OPT_OptimizingCompilerException("Unsupported type " + fieldType);    }  }