Пример #1
0
  @Override
  public void verify(DecodedInstruction instruction, RegisterTypeSparseArray registerTypes)
      throws VerifyException {

    RegisterType tmpType = registerTypes.get(instruction.getA(), instruction);

    if (tmpType.typeEnum().category() != RegisterCategory.kTypeCategory1nr
        || tmpType.typeEnum() == kRegTypeFloat)
      throw new VerifyException(
          VerifyErrorCause.VERIFY_ERROR_GENERIC, "VFY: args to 'if' must be cat-1nr and not float");

    tmpType = registerTypes.get(instruction.getB(), instruction);
    if (tmpType.typeEnum().category() != RegisterCategory.kTypeCategory1nr
        || tmpType.typeEnum() == kRegTypeFloat)
      throw new VerifyException(
          VerifyErrorCause.VERIFY_ERROR_GENERIC, "VFY: args to 'if' must be cat-1nr and not float");
  }