From e27339039caa8d2621b5d503acf2687936b3203d Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 29 Jun 2021 14:59:38 +0200 Subject: [PATCH] PPCAnalyst: Actually check if instructions want CR --- Source/Core/Core/PowerPC/PPCAnalyst.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Core/Core/PowerPC/PPCAnalyst.cpp b/Source/Core/Core/PowerPC/PPCAnalyst.cpp index 127d3f1cd4..f6d9459e21 100644 --- a/Source/Core/Core/PowerPC/PPCAnalyst.cpp +++ b/Source/Core/Core/PowerPC/PPCAnalyst.cpp @@ -532,6 +532,13 @@ void PPCAnalyzer::SetInstructionStats(CodeBlock* block, CodeOp* code, } code->wantsCR = BitSet8(0); + if (opinfo->flags & FL_READ_ALL_CR) + code->wantsCR = BitSet8(0xFF); + else if (opinfo->flags & FL_READ_CRn) + code->wantsCR[code->inst.CRFS] = true; + else if (opinfo->flags & FL_READ_CR_BI) + code->wantsCR[code->inst.BI] = true; + code->outputCR = BitSet8(0); if (opinfo->flags & FL_SET_ALL_CR) code->outputCR = BitSet8(0xFF);