summaryrefslogtreecommitdiff
path: root/sys/src/cmd/aux/realemu
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-10-25 06:55:41 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-10-25 06:55:41 +0200
commitda759a7fced73d5a75b38be367b42a6269c1c622 (patch)
treed3e2dfd6885cdbc04394d98a25cf15408a864ebd /sys/src/cmd/aux/realemu
parente63f13a8de79af905b6db5cd8dc989e33d494832 (diff)
realemu: fix REP prefix condition
Diffstat (limited to 'sys/src/cmd/aux/realemu')
-rw-r--r--sys/src/cmd/aux/realemu/xec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/src/cmd/aux/realemu/xec.c b/sys/src/cmd/aux/realemu/xec.c
index 3371f21f6..5a5f8a8cf 100644
--- a/sys/src/cmd/aux/realemu/xec.c
+++ b/sys/src/cmd/aux/realemu/xec.c
@@ -1067,7 +1067,7 @@ repcond(ulong *f, int rep)
{
if(rep == OREPNE)
return (*f & ZF) == 0;
- return !rep || (*f & ZF) != 0;
+ return (*f & ZF) != 0;
}
static void
@@ -1098,7 +1098,7 @@ opscas(Cpu *cpu, Inst *i)
d->off += n;
d->off &= m;
c--;
- if(repcond(f, i->rep))
+ if(!repcond(f, i->rep))
break;
}
aw(areg(cpu, i->alen, RDI), d->off);
@@ -1135,7 +1135,7 @@ opcmps(Cpu *cpu, Inst *i)
d->off += n;
d->off &= m;
c--;
- if(repcond(f, i->rep))
+ if(!repcond(f, i->rep))
break;
}
aw(areg(cpu, i->alen, RDI), d->off);