- if (po->flags & (OPF_REPZ|OPF_REPNZ)) {
- struct parsed_opr opr = OPR_INIT(OPT_REG, OPLM_DWORD, xCX);
- ret = try_resolve_const(i, &opr, opcnt * 7 + i, &uval);
-
- if (ret != 1 || uval == 0) {
- // we need initial flags for ecx=0 case..
- if (i > 0 && ops[i - 1].op == OP_XOR
- && IS(ops[i - 1].operand[0].name,
- ops[i - 1].operand[1].name))
- {
- fprintf(fout, " cond_z = ");
- if (pfomask & (1 << PFO_C))
- fprintf(fout, "cond_c = ");
- fprintf(fout, "0;\n");
- }
- else if (last_arith_dst != NULL) {
- out_src_opr_u32(buf3, sizeof(buf3), po, last_arith_dst);
- out_test_for_cc(buf1, sizeof(buf1), po, PFO_Z, 0,
- last_arith_dst->lmod, buf3);
- fprintf(fout, " cond_z = %s;\n", buf1);
- }
- else
- ferr(po, "missing initial ZF\n");
- }
- }
-