mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 19:10:50 +00:00
- fix jump direction in EmitComparisonOpcode
This commit is contained in:
parent
9530a2e43c
commit
f7dd6a1313
1 changed files with 7 additions and 5 deletions
|
@ -2812,16 +2812,18 @@ private:
|
||||||
int i = (int)(ptrdiff_t)(pc - sfunc->Code);
|
int i = (int)(ptrdiff_t)(pc - sfunc->Code);
|
||||||
|
|
||||||
auto tmp = cc.newInt32();
|
auto tmp = cc.newInt32();
|
||||||
|
cc.xor_(tmp, tmp);
|
||||||
compFunc(tmp);
|
compFunc(tmp);
|
||||||
|
|
||||||
bool check = static_cast<bool>(A & CMP_CHECK);
|
bool check = static_cast<bool>(A & CMP_CHECK);
|
||||||
|
|
||||||
cc.test(tmp, tmp);
|
auto jmplabel = labels[i + 2 + JMPOFS(pc + 1)];
|
||||||
if (check) cc.je(labels[i + 2]);
|
|
||||||
else cc.jne(labels[i + 2]);
|
|
||||||
|
|
||||||
cc.jmp(labels[i + 2 + JMPOFS(pc + 1)]);
|
cc.test(tmp, tmp);
|
||||||
|
if (check) cc.je(jmplabel);
|
||||||
|
else cc.jne(jmplabel);
|
||||||
|
|
||||||
|
pc++; // This instruction uses two instruction slots - skip the next one
|
||||||
}
|
}
|
||||||
|
|
||||||
static int64_t ToMemAddress(const void *d)
|
static int64_t ToMemAddress(const void *d)
|
||||||
|
|
Loading…
Reference in a new issue