OpcodeDispatcher: use real branch for rep scas

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig 2024-02-28 10:19:42 -04:00
parent e47a94cae7
commit edd6becc56

View File

@ -3986,9 +3986,8 @@ void OpDispatchBuilder::SCASOp(OpcodeArgs) {
TailDest_RDI = _Add(OpSize::i64Bit, TailDest_RDI, PtrDir);
StoreGPRRegister(X86State::REG_RDI, TailDest_RDI);
OrderedNode *ZF = GetRFLAG(FEXCore::X86State::RFLAG_ZF_RAW_LOC);
CalculateDeferredFlags();
InternalCondJump = CondJump(ZF, {REPE ? COND_NEQ : COND_EQ});
InternalCondJump = CondJumpNZCV({REPE ? COND_EQ : COND_NEQ});
// Jump back to the start if we have more work to do
SetTrueJumpTarget(InternalCondJump, LoopStart);