def _translate_stos_suffix(self, tb, instruction, suffix):
        # Flags Affected
        # None.

        # DEST <- SRC;
        # IF DF = 0
        #     THEN (E)DI <- (E)DI + sizeof(SRC);
        #     ELSE (E)DI <- (E)DI - sizeof(SRC);
        # FI;

        # Define source register.
        if suffix == 'b':
            src = ReilRegisterOperand("al", 8)
        elif suffix == 'w':
            src = ReilRegisterOperand("ax", 16)
        elif suffix == 'd':
            src = ReilRegisterOperand("eax", 32)
        elif suffix == 'q':
            src = ReilRegisterOperand("rax", 64)
        else:
            raise Exception("Invalid instruction suffix: %s" % suffix)

        # Define destination register.
        if self._arch_mode == ARCH_X86_MODE_32:
            dst = ReilRegisterOperand("edi", 32)
        elif self._arch_mode == ARCH_X86_MODE_64:
            dst = ReilRegisterOperand("rdi", 64)
        else:
            raise Exception("Invalid architecture mode: %d", self._arch_mode)

        if instruction.prefix:
            counter, loop_start_lbl = self._rep_prefix_begin(tb, instruction)

        # Instruction
        # -------------------------------------------------------------------- #
        # Move data.
        tb.add(self._builder.gen_stm(src, dst))

        # Update destination pointer.
        self._update_strings_dst(tb, dst, src.size, instruction)
        # -------------------------------------------------------------------- #

        if instruction.prefix:
            self._rep_prefix_end(tb, instruction, counter, loop_start_lbl)
dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86translator.py/X86Translator._translate_stos_suffix/original