def __init__(self, inst, code_units):
    Opcode.__init__(self, inst)
    self.nature = inst.get_AA()
    if (self.nature == 0):
        pass
    elif (self.nature == 1):
        self.size = code_units.get_code_unit()
        self.first_key = code_units.get_int()
        self.targets = list()
        for i in range(self.size):
            self.targets.append(code_units.get_int())
    elif (self.nature == 2):
        self.size = code_units.get_code_unit()
        self.keys = list()
        self.targets = list()
        for i in range(self.size):
            self.keys.append(code_units.get_int())
        for i in range(self.size):
            self.targets.append(code_units.get_int())
    elif (self.nature == 3):
        self.element_width = code_units.get_code_unit()
        self.size = code_units.get_uint()
        num_code_units = int((((self.size * self.element_width) + 1) / 2))
        encoder = file_extract.FileEncode(StringIO.StringIO(), 'little', 4)
        for i in range(num_code_units):
            encoder.put_uint16(code_units.get_code_unit())
        encoder.seek(0)
        self.data = encoder.file.getvalue()
    else:
        raise ValueError(('add support for NOP nature %u' % self.nature))
def __init__(self, inst, code_units):
    Opcode.__init__(self, inst)
    self.nature = inst.get_AA()
    if (self.nature == 0):
        pass
    elif (self.nature == 1):
        self.size = code_units.get_code_unit()
        self.first_key = code_units.get_int()
        self.targets = list()
        for i in range(self.size):
            self.targets.append(code_units.get_int())
    elif (self.nature == 2):
        self.size = code_units.get_code_unit()
        self.keys = list()
        self.targets = list()
        for i in range(self.size):
            self.keys.append(code_units.get_int())
        for i in range(self.size):
            self.targets.append(code_units.get_int())
    elif (self.nature == 3):
        self.element_width = code_units.get_code_unit()
        self.size = code_units.get_uint()
        num_code_units = int((((self.size * self.element_width) + 1) / 2))
        encoder = file_extract.FileEncode(StringIO.StringIO(), 'little', 4)
        for i in range(num_code_units):
            encoder.put_uint16(code_units.get_code_unit())
        encoder.seek(0)
        self.data = encoder.file.getvalue()
    else:
        raise ValueError(('add support for NOP nature %u' % self.nature))