

def _translate_cmov(self, tb, instruction, cmov_cond):
    eval_cond_fn_name = ('_evaluate_' + cmov_cond)
    eval_cond_fn = getattr(self, eval_cond_fn_name, self._not_implemented)
    oprnd0 = tb.read(instruction.operands[0])
    tmp = tb.temporal(oprnd0.size)
    tb.add(self._builder.gen_str(oprnd0, tmp))
    tb.write(instruction.operands[0], tmp)
    cmov_cond_not_met = Label('cmov_cond_not_met')
    neg_cond = tb._negate_reg(eval_cond_fn(tb))
    tb.add(self._builder.gen_jcc(neg_cond, cmov_cond_not_met))
    oprnd1 = tb.read(instruction.operands[1])
    tb.write(instruction.operands[0], oprnd1)
    tb.add(cmov_cond_not_met)
    tb.add(self._builder.gen_nop())

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