

def _translate_sahf(self, tb, instruction):
    oprnd0 = ReilRegisterOperand('ah', 8)
    tmp0 = tb.temporal(oprnd0.size)
    tmp1 = tb.temporal(oprnd0.size)
    tmp2 = tb.temporal(oprnd0.size)
    tmp3 = tb.temporal(oprnd0.size)
    shl_two = tb.immediate((- 2), 8)
    shl_one = tb.immediate((- 1), 8)
    tb.add(self._builder.gen_str(oprnd0, self._flags['cf']))
    tb.add(self._builder.gen_bsh(oprnd0, shl_two, tmp0))
    tb.add(self._builder.gen_str(tmp0, self._flags['pf']))
    tb.add(self._builder.gen_bsh(tmp0, shl_two, tmp1))
    tb.add(self._builder.gen_str(tmp1, self._flags['af']))
    tb.add(self._builder.gen_bsh(tmp1, shl_two, tmp2))
    tb.add(self._builder.gen_str(tmp2, self._flags['zf']))
    tb.add(self._builder.gen_bsh(tmp2, shl_one, tmp3))
    tb.add(self._builder.gen_str(tmp3, self._flags['sf']))

dataset/ETHPy150Open programa-stic/barf-project/barf/barf/arch/x86/x86translator.py X86Translator._translate_sahf/original