From 51ceec74a351bd25a1066ec2c02c2aa3f8c813f4 Mon Sep 17 00:00:00 2001 From: Shanoah Alkire Date: Thu, 15 Nov 2018 00:55:49 -0800 Subject: [PATCH] A bit of cleanup. --- pcsx2/x86/iR3000A.cpp | 10 ---------- pcsx2/x86/ix86-32/iCore-32.cpp | 5 +++-- pcsx2/x86/ix86-32/iR5900-32.cpp | 15 +-------------- 3 files changed, 4 insertions(+), 26 deletions(-) diff --git a/pcsx2/x86/iR3000A.cpp b/pcsx2/x86/iR3000A.cpp index f4c1c9bb41..8c87e566f2 100644 --- a/pcsx2/x86/iR3000A.cpp +++ b/pcsx2/x86/iR3000A.cpp @@ -1023,8 +1023,6 @@ void rpsxBREAK() void psxRecompileNextInstruction(int delayslot) { - static u8 s_bFlushReg = 1; - // pblock isn't used elsewhere in this function. //BASEBLOCK* pblock = PSX_GETBLOCK(psxpc); @@ -1043,14 +1041,6 @@ void psxRecompileNextInstruction(int delayslot) rpsxBSC[ psxRegs.code >> 26 ](); s_psxBlockCycles += g_iopCyclePenalty; - if( !delayslot ) { - if( s_bFlushReg ) { - //_psxFlushUnusedConstReg(); - } - else s_bFlushReg = 1; - } - else s_bFlushReg = 1; - _clearNeededX86regs(); } diff --git a/pcsx2/x86/ix86-32/iCore-32.cpp b/pcsx2/x86/ix86-32/iCore-32.cpp index 2e9a6c5a99..71ea0dff24 100644 --- a/pcsx2/x86/ix86-32/iCore-32.cpp +++ b/pcsx2/x86/ix86-32/iCore-32.cpp @@ -275,13 +275,14 @@ int _allocX86reg(xRegisterLong x86reg, int type, int reg, int mode) if ( (int)i == esp.GetId() || (int)i == ebp.GetId() ) continue; if (!x86regs[i].inuse || x86regs[i].type != type || x86regs[i].reg != reg) continue; - if( i >= maxreg ) { + // We're in a for loop until i= maxreg ) { if (x86regs[i].mode & MODE_READ) readfromreg = i; mode |= x86regs[i].mode&MODE_WRITE; x86regs[i].inuse = 0; break; - } + }*/ if( !x86reg.IsEmpty() ) { // requested specific reg, so return that instead diff --git a/pcsx2/x86/ix86-32/iR5900-32.cpp b/pcsx2/x86/ix86-32/iR5900-32.cpp index 49d61c557f..08320cdff0 100644 --- a/pcsx2/x86/ix86-32/iR5900-32.cpp +++ b/pcsx2/x86/ix86-32/iR5900-32.cpp @@ -1265,7 +1265,6 @@ void encodeMemcheck() void recompileNextInstruction(int delayslot) { - static u8 s_bFlushReg = 1; u32 i; int count; @@ -1350,19 +1349,7 @@ void recompileNextInstruction(int delayslot) } } - if( !delayslot ) { - if( s_bFlushReg ) { - //if( !_flushUnusedConstReg() ) { - int flushed = 0; - if( false ) flushed = 0; // old mmx path. I don't understand why flushed isn't set in the line below - if( !flushed && _getNumXMMwrite() > 2 ) _flushXMMunused(); - s_bFlushReg = !flushed; -// } -// else s_bFlushReg = 0; - } - else s_bFlushReg = 1; - } - else s_bFlushReg = 1; + if (!delayslot && (_getNumXMMwrite() > 2)) _flushXMMunused(); //CHECK_XMMCHANGED(); _clearNeededX86regs();