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