@classmethod
def from_string(cls, s):
    """
        Create Register object from string.

        :param s: must have the form: "llvm_type:constraint_char"
        """
    llvm_type, constraint_char = s.split(':', 1)
    valid_cc = 'rx'
    if constraint_char not in valid_cc:
        raise ValueError('Invalid constraint character, must be one of {!r}'
            .format(valid_cc))
    return cls(llvm_type, constraint_char)
