public RandomArgument(Program p, ArgumentType type, String labelName, Condition condition) {
        super(p, type, labelName, condition);
        switch (type) {
            case REGISTER:
                value_register = p.getRandomRegister(false);
                break;
            case VREGISTER:
                value_register = p.getRandomRegister(true);
                break;
            case IMMEDIATE4:
                value_immediate = (short)(Math.random() * (1 << 3));
                break;
            case IMMEDIATE8:
                value_immediate = (short)(Math.random() * (1 << 7));
                break;
            case LABEL:
                value_label = labelName;
                break;
            case CONDITION:
                value_condition = condition;
                break;
            default:
                throw new RuntimeException("Unknown argument type.");
        }
    }