def write(self, x86_operand, value):

        if isinstance(x86_operand, barf.arch.x86.x86base.X86RegisterOperand):

            reil_operand = ReilRegisterOperand(x86_operand.name, x86_operand.size)

            if self._arch_info.architecture_mode == ARCH_X86_MODE_64 and \
                x86_operand.size == 32:
                if x86_operand.name in self._regs_mapper:
                    base_reg, offset = self._regs_mapper[x86_operand.name]

                    reil_operand_base = ReilRegisterOperand(base_reg, self._regs_size[base_reg])
                    reil_immediate = ReilImmediateOperand(0x0, self._regs_size[base_reg])

                    self.add(self._builder.gen_str(reil_immediate, reil_operand_base))

            self.add(self._builder.gen_str(value, reil_operand))

        elif isinstance(x86_operand, barf.arch.x86.x86base.X86MemoryOperand):

            addr = self._compute_memory_address(x86_operand)

            if value.size != x86_operand.size:
                tmp = self.temporal(x86_operand.size)

                self.add(self._builder.gen_str(value, tmp))

                self.add(self._builder.gen_stm(tmp, addr))
            else:
                self.add(self._builder.gen_stm(value, addr))

        else:
            raise Exception()
dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86translator.py/X86TranslationBuilder.write/original