diff --git a/src/cpu/core_full/op.h b/src/cpu/core_full/op.h index b2800dcf..e2c7426e 100644 --- a/src/cpu/core_full/op.h +++ b/src/cpu/core_full/op.h @@ -316,10 +316,10 @@ switch (inst.code.op) { if (--reg_cx) break; goto nextopcode; case O_LOOPZ: - if (--reg_cx && !get_ZF()) break; + if (--reg_cx && get_ZF()) break; goto nextopcode; case O_LOOPNZ: - if (--reg_cx && get_ZF()) break; + if (--reg_cx && !get_ZF()) break; goto nextopcode; case O_JCXZ: if (reg_cx) goto nextopcode;