def check_encoding(self, f=sys.stdout):
    if ((self.reg <= UINT4_MAX) and (INT4_MIN <= self.imm) and (self.imm <= INT4_MAX)):
        f.write('warning: "const/16" can be encoded as a "const/4" more ')
        f.write(('efficiently as its register is <= %u and ' % UINT4_MAX))
        f.write(('(%i <= %i <= %i)\n' % (INT4_MIN, self.imm, INT4_MAX)))
        return 2
    return 0
def check_encoding(self, f=sys.stdout):
    if ((self.reg <= UINT4_MAX) and (INT4_MIN <= self.imm) and (self.imm <= INT4_MAX)):
        f.write('warning: "const/16" can be encoded as a "const/4" more ')
        f.write(('efficiently as its register is <= %u and ' % UINT4_MAX))
        f.write(('(%i <= %i <= %i)\n' % (INT4_MIN, self.imm, INT4_MAX)))
        return 2
    return 0