From 45443b48efeba01072ea15e6c9f9d68a2e7b58bc Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 7 Feb 2016 12:56:30 +0100 Subject: [PATCH] EE: freeMMXreg is a nop because inuse == 0 --- pcsx2/x86/iCore.h | 2 -- pcsx2/x86/ix86-32/iCore-32.cpp | 40 --------------------------------- pcsx2/x86/ix86-32/iR5900-32.cpp | 6 +---- pcsx2/x86/sVU_Debug.h | 4 ---- 4 files changed, 1 insertion(+), 51 deletions(-) diff --git a/pcsx2/x86/iCore.h b/pcsx2/x86/iCore.h index d99cc2980f..4df9ba0403 100644 --- a/pcsx2/x86/iCore.h +++ b/pcsx2/x86/iCore.h @@ -313,10 +313,8 @@ struct _mmxregs { void _initMMXregs(); void _clearNeededMMXregs(); -void _freeMMXreg(u32 mmxreg); void _flushMMXregs(); u8 _hasFreeMMXreg(); -void _freeMMXregs(); int _getNumMMXwrite(); // returns new index of reg, lower 32 bits already in mmx diff --git a/pcsx2/x86/ix86-32/iCore-32.cpp b/pcsx2/x86/ix86-32/iCore-32.cpp index 98acbdddcb..57b9f8c4c0 100644 --- a/pcsx2/x86/ix86-32/iCore-32.cpp +++ b/pcsx2/x86/ix86-32/iCore-32.cpp @@ -519,30 +519,6 @@ int _getNumMMXwrite() return num; } -void _freeMMXreg(u32 mmxreg) -{ - pxAssert( mmxreg < iREGCNT_MMX ); - if (!mmxregs[mmxreg].inuse) return; - - if (mmxregs[mmxreg].mode & MODE_WRITE ) { - // Not sure if this line is accurate, since if the 32 was 34, it would be MMX_ISGPR. - if ( /*mmxregs[mmxreg].reg >= MMX_GPR &&*/ mmxregs[mmxreg].reg < MMX_GPR+32 ) // Checking if a u32 is >=0 is pointless. - pxAssert( !(g_cpuHasConstReg & (1<<(mmxregs[mmxreg].reg-MMX_GPR))) ); - - pxAssert( mmxregs[mmxreg].reg != MMX_GPR ); - - if( MMX_IS32BITS(mmxregs[mmxreg].reg) ) - xMOVD(ptr[(_MMXGetAddr(mmxregs[mmxreg].reg))], xRegisterMMX(mmxreg)); - else - xMOVQ(ptr[(_MMXGetAddr(mmxregs[mmxreg].reg))], xRegisterMMX(mmxreg)); - - SetMMXstate(); - } - - mmxregs[mmxreg].mode &= ~MODE_WRITE; - mmxregs[mmxreg].inuse = 0; -} - // write all active regs void _flushMMXregs() { @@ -569,23 +545,7 @@ void _flushMMXregs() } } -void _freeMMXregs() -{ - uint i; - for (i=0; i