A bit of cleanup.

This commit is contained in:
Shanoah Alkire 2018-11-15 00:55:49 -08:00
parent ca68ddd0d0
commit 51ceec74a3
3 changed files with 4 additions and 26 deletions

View File

@ -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();
}

View File

@ -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. This will never happen.
/*if( 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

View File

@ -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();