

def _translate_set(self, tb, instruction, set_cond):
    eval_cond_fn_name = ('_evaluate_' + set_cond)
    eval_cond_fn = getattr(self, eval_cond_fn_name, self._not_implemented)
    tb.write(instruction.operands[0], tb.immediate(0, 1))
    set_cond_not_met = Label('set_cond_not_met')
    neg_cond = tb._negate_reg(eval_cond_fn(tb))
    tb.add(self._builder.gen_jcc(neg_cond, set_cond_not_met))
    tb.write(instruction.operands[0], tb.immediate(1, 1))
    tb.add(set_cond_not_met)
    tb.add(self._builder.gen_nop())

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