mirror of https://github.com/PCSX2/pcsx2.git
Avoid using MMX in EErec operations where possible. This bypasses hangs in Bully for now.
The problem needs to be fixed more thoroughly in the future, by rewriting several opcodes. You can find all changed locations via the comment "// Fixme: MMX problem". git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2688 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
6c4c4e316d
commit
d3716fd295
|
@ -65,7 +65,8 @@ void recADD_constv(int info, int creg, int vreg)
|
|||
{
|
||||
pxAssert( !(info&PROCESS_EE_XMM) );
|
||||
|
||||
if(!g_cpuConstRegs[ creg ].UL[0]) {
|
||||
// Fixme: MMX problem
|
||||
if(0/*!g_cpuConstRegs[ creg ].UL[0]*/) {
|
||||
int mmreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
SetMMXstate();
|
||||
|
||||
|
@ -200,7 +201,8 @@ void recDADD_constv(int info, int creg, int vreg)
|
|||
{
|
||||
pxAssert( !(info&PROCESS_EE_XMM) );
|
||||
|
||||
if( g_cpuConstRegs[ creg ].UL[0] == 0 && g_cpuConstRegs[ creg ].UL[1] == 0 && _hasFreeMMXreg() ) {
|
||||
// Fixme: MMX problem
|
||||
if(0/* g_cpuConstRegs[ creg ].UL[0] == 0 && g_cpuConstRegs[ creg ].UL[1] == 0 && _hasFreeMMXreg() */) {
|
||||
// copy
|
||||
int mmreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
if( EEINST_ISLIVE1(_Rd_) ) MOVQMtoR(mmreg, (int)&cpuRegs.GPR.r[ vreg ].UL[ 0 ]);
|
||||
|
@ -342,7 +344,8 @@ void recSUB_constt(int info)
|
|||
EEINST_SETSIGNEXT(_Rs_);
|
||||
EEINST_SETSIGNEXT(_Rd_);
|
||||
|
||||
if(!g_cpuConstRegs[_Rt_].UL[0]) {
|
||||
// Fixme: MMX problem
|
||||
if(0/*!g_cpuConstRegs[_Rt_].UL[0]*/) {
|
||||
int mmreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
SetMMXstate();
|
||||
|
||||
|
@ -675,7 +678,8 @@ void recOR_constv(int info, int creg, int vreg)
|
|||
{
|
||||
pxAssert( !(info & PROCESS_EE_XMM) );
|
||||
|
||||
if(_Rd_ != vreg && _hasFreeMMXreg()) {
|
||||
// Fixme: MMX problem
|
||||
if(0/*_Rd_ != vreg && _hasFreeMMXreg()*/) {
|
||||
int rdreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
SetMMXstate();
|
||||
|
||||
|
@ -738,7 +742,8 @@ void recXOR_constv(int info, int creg, int vreg)
|
|||
{
|
||||
pxAssert( !(info & PROCESS_EE_XMM) );
|
||||
|
||||
if(_Rd_ != vreg && _hasFreeMMXreg()) {
|
||||
// Fixme: MMX problem
|
||||
if(0/*_Rd_ != vreg && _hasFreeMMXreg()*/) {
|
||||
int rdreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
SetMMXstate();
|
||||
MOVQMtoR(rdreg, (u32)&cpuRegs.GPR.r[vreg].UL[0] );
|
||||
|
@ -800,7 +805,8 @@ void recNOR_constv(int info, int creg, int vreg)
|
|||
{
|
||||
pxAssert( !(info & PROCESS_EE_XMM) );
|
||||
|
||||
if(_Rd_ != vreg && _hasFreeMMXreg()) {
|
||||
// Fixme: MMX problem
|
||||
if(0/*_Rd_ != vreg && _hasFreeMMXreg()*/) {
|
||||
int rdreg = _allocMMXreg(-1, MMX_GPR+_Rd_, MODE_WRITE);
|
||||
int t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
|
||||
|
|
|
@ -192,9 +192,10 @@ void recSetBranchEQ(int info, int bne, int process)
|
|||
|
||||
void recSetBranchL(int ltz)
|
||||
{
|
||||
int regs = _checkMMXreg(MMX_GPR+_Rs_, MODE_READ);
|
||||
// Fixme: MMX problem
|
||||
int regs;/* = _checkMMXreg(MMX_GPR+_Rs_, MODE_READ);*/
|
||||
|
||||
if( regs >= 0 ) {
|
||||
/*if( regs >= 0 ) {
|
||||
|
||||
int t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
|
||||
|
@ -213,7 +214,7 @@ void recSetBranchL(int ltz)
|
|||
else j32Ptr[ 0 ] = JNZ32( 0 );
|
||||
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
regs = _checkXMMreg(XMMTYPE_GPRREG, _Rs_, MODE_READ);
|
||||
|
||||
|
|
|
@ -442,7 +442,8 @@ void recMOVZtemp_consts(int info)
|
|||
|
||||
void recMOVZtemp_constt(int info)
|
||||
{
|
||||
if( _hasFreeXMMreg() ) {
|
||||
// Fixme: MMX problem
|
||||
if(0/* _hasFreeXMMreg() */) {
|
||||
int t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
MOVQMtoR(t0reg, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]);
|
||||
MOVQRtoM((int)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], t0reg);
|
||||
|
@ -460,7 +461,8 @@ void recMOVZtemp_(int info)
|
|||
{
|
||||
int t0reg = -1;
|
||||
|
||||
if( _hasFreeXMMreg() )
|
||||
// Fixme: MMX problem
|
||||
if(0/* _hasFreeXMMreg() */)
|
||||
t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
|
||||
MOV32MtoR( EAX, (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] );
|
||||
|
@ -519,7 +521,8 @@ void recMOVNtemp_consts(int info)
|
|||
|
||||
void recMOVNtemp_constt(int info)
|
||||
{
|
||||
if( _hasFreeXMMreg() ) {
|
||||
// Fixme: MMX problem
|
||||
if(0/* _hasFreeXMMreg() */) {
|
||||
int t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
MOVQMtoR(t0reg, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]);
|
||||
MOVQRtoM((int)&cpuRegs.GPR.r[ _Rd_ ].UL[ 0 ], t0reg);
|
||||
|
@ -537,7 +540,8 @@ void recMOVNtemp_(int info)
|
|||
{
|
||||
int t0reg=-1;
|
||||
|
||||
if( _hasFreeXMMreg() )
|
||||
// Fixme: MMX problem
|
||||
if(0/* _hasFreeXMMreg() */)
|
||||
t0reg = _allocMMXreg(-1, MMX_TEMP, 0);
|
||||
|
||||
MOV32MtoR( EAX, (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ] );
|
||||
|
|
|
@ -70,9 +70,10 @@ void _deleteEEreg(int reg, int flush)
|
|||
// if not mmx, then xmm
|
||||
int eeProcessHILO(int reg, int mode, int mmx)
|
||||
{
|
||||
int usemmx = mmx && _hasFreeMMXreg();
|
||||
// Fixme: MMX problem
|
||||
int usemmx = 0/*mmx && _hasFreeMMXreg()*/;
|
||||
if( (usemmx || _hasFreeXMMreg()) || !(g_pCurInstInfo->regs[reg]&EEINST_LASTUSE) ) {
|
||||
if( usemmx ) return _allocMMXreg(-1, MMX_GPR+reg, mode);
|
||||
//if( usemmx ) return _allocMMXreg(-1, MMX_GPR+reg, mode);
|
||||
return _allocGPRtoXMMreg(-1, reg, mode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue