mirror of https://github.com/PCSX2/pcsx2.git
EE: remove more unused MMX functions
This commit is contained in:
parent
a0e619bcd7
commit
054d8c4c9f
|
@ -316,7 +316,6 @@ int _checkMMXreg(int reg, int mode);
|
|||
void _clearNeededMMXregs();
|
||||
void _deleteMMXreg(int reg, int flush);
|
||||
void _freeMMXreg(u32 mmxreg);
|
||||
void _moveMMXreg(int mmxreg); // instead of freeing, moves it to a diff location
|
||||
void _flushMMXregs();
|
||||
u8 _hasFreeMMXreg();
|
||||
void _freeMMXregs();
|
||||
|
|
|
@ -591,36 +591,6 @@ int _getNumMMXwrite()
|
|||
return num;
|
||||
}
|
||||
|
||||
u8 _hasFreeMMXreg()
|
||||
{
|
||||
uint i;
|
||||
for (i=0; i<iREGCNT_MMX; i++) {
|
||||
if (!mmxregs[i].inuse) return 1;
|
||||
}
|
||||
|
||||
// check for dead regs
|
||||
for (i=0; i<iREGCNT_MMX; i++) {
|
||||
if (mmxregs[i].needed) continue;
|
||||
if (MMX_ISGPR(mmxregs[i].reg)) {
|
||||
if( !EEINST_ISLIVE64(mmxregs[i].reg-MMX_GPR) ) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// check for dead regs
|
||||
for (i=0; i<iREGCNT_MMX; i++) {
|
||||
if (mmxregs[i].needed) continue;
|
||||
if (MMX_ISGPR(mmxregs[i].reg)) {
|
||||
if( !(g_pCurInstInfo->regs[mmxregs[i].reg-MMX_GPR]&EEINST_USED) ) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void _freeMMXreg(u32 mmxreg)
|
||||
{
|
||||
pxAssert( mmxreg < iREGCNT_MMX );
|
||||
|
@ -645,27 +615,6 @@ void _freeMMXreg(u32 mmxreg)
|
|||
mmxregs[mmxreg].inuse = 0;
|
||||
}
|
||||
|
||||
void _moveMMXreg(int mmxreg)
|
||||
{
|
||||
uint i;
|
||||
if( !mmxregs[mmxreg].inuse ) return;
|
||||
|
||||
for (i=0; i<iREGCNT_MMX; i++) {
|
||||
if (mmxregs[i].inuse) continue;
|
||||
break;
|
||||
}
|
||||
|
||||
if( i == iREGCNT_MMX ) {
|
||||
_freeMMXreg(mmxreg);
|
||||
return;
|
||||
}
|
||||
|
||||
// move
|
||||
mmxregs[i] = mmxregs[mmxreg];
|
||||
mmxregs[mmxreg].inuse = 0;
|
||||
xMOVQ(xRegisterMMX(i), xRegisterMMX(mmxreg));
|
||||
}
|
||||
|
||||
// write all active regs
|
||||
void _flushMMXregs()
|
||||
{
|
||||
|
|
|
@ -69,7 +69,7 @@ void _flushEEreg(int reg)
|
|||
int eeProcessHILO(int reg, int mode, int mmx)
|
||||
{
|
||||
// Fixme: MMX problem
|
||||
int usemmx = 0/*mmx && _hasFreeMMXreg()*/;
|
||||
int usemmx = 0;
|
||||
if( (usemmx || _hasFreeXMMreg()) || !(g_pCurInstInfo->regs[reg]&EEINST_LASTUSE) ) {
|
||||
return _allocGPRtoXMMreg(-1, reg, mode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue