From bd17a637ba4068456e8041f701df9539977859a8 Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Tue, 7 Oct 2008 02:32:38 +0000 Subject: [PATCH] O git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@174 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/x86/ix86-32/iR5900AritImm.c | 38 ++++++++++++++++++------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/pcsx2/x86/ix86-32/iR5900AritImm.c b/pcsx2/x86/ix86-32/iR5900AritImm.c index 3d808a9cd5..155911300b 100644 --- a/pcsx2/x86/ix86-32/iR5900AritImm.c +++ b/pcsx2/x86/ix86-32/iR5900AritImm.c @@ -394,27 +394,33 @@ void recLogicalOpI(int info, int op) } } else { + //SysPrintf("recLogicalOpI\n"); if ( _ImmU_ != 0 ) { if( _Rt_ == _Rs_ ) { LogicalOp32ItoM((int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], _ImmU_, op); - //LogicalOp32ItoM((int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], (_ImmSB_ && (op == 1)) ? 0xffffffff : 0, op); + if (op == 0) { + if ( EEINST_ISLIVE1(_Rt_) ) MOV32ItoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); + else EEINST_RESETHASLIVE1(_Rt_); + } + else if ( EEINST_ISLIVE1(_Rt_) && _ImmSB_ && (op == 1) ) MOV32ItoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0xffffffff ); } else { MOV32MtoR( EAX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if( op != 0 && EEINST_ISLIVE1(_Rt_) ) { - MOV32MtoR( EDX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ] ); - LogicalOp32ItoR( EAX, _ImmU_, op); - MOV32RtoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], EDX ); - } - else LogicalOp32ItoR( EAX, _ImmU_, op); - + LogicalOp32ItoR( EAX, _ImmU_, op); MOV32RtoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX ); - } - if( op == 0 ) { - if( EEINST_ISLIVE1(_Rt_ ) ) MOV32ItoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); - else EEINST_RESETHASLIVE1(_Rt_); + if (op == 0) { + if ( EEINST_ISLIVE1(_Rt_) ) MOV32ItoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0 ); + else EEINST_RESETHASLIVE1(_Rt_); + } + else if ( EEINST_ISLIVE1(_Rt_) ) { + if (_ImmSB_ && (op == 1)) MOV32ItoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], 0xffffffff ); + else { + MOV32MtoR( EAX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ] ); + MOV32RtoM( (int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], EAX ); + } + } } } else @@ -427,11 +433,11 @@ void recLogicalOpI(int info, int op) else { if( _Rt_ != _Rs_ ) { MOV32MtoR(EAX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ] ); - if( EEINST_ISLIVE1(_Rt_ ) ) - MOV32MtoR(EDX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ] ); MOV32RtoM((int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 0 ], EAX ); - if( EEINST_ISLIVE1(_Rt_ ) ) - MOV32RtoM((int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], EDX ); + if( EEINST_ISLIVE1(_Rt_ ) ) { + MOV32MtoR(EAX, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 1 ] ); + MOV32RtoM((int)&cpuRegs.GPR.r[ _Rt_ ].UL[ 1 ], EAX ); + } } }