minor FPU opcode change.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@417 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
cottonvibes 2008-12-12 06:21:08 +00:00 committed by Gregory Hainaut
parent 77a83aa5e7
commit 629f628300
1 changed files with 6 additions and 5 deletions

View File

@ -992,24 +992,25 @@ void recCVT_W()
if( regs >= 0 )
{
if (CHECK_FPU_EXTRA_OVERFLOW) ClampValues(regs);
SSE_CVTTSS2SI_XMM_to_R32(EAX, regs);
SSE_MOVMSKPS_XMM_to_R32(EDX,regs); //extract the signs
SSE_MOVMSKPS_XMM_to_R32(EDX, regs); //extract the signs
AND32ItoR(EDX,1); //keep only LSB
}
else
{
SSE_CVTTSS2SI_M32_to_R32(EAX, (uptr)&fpuRegs.fpr[ _Fs_ ]);
MOV32MtoR(EDX, (uptr)&fpuRegs.fpr[ _Fs_ ]);
SHR32ItoR(EDX,31); //mov sign to lsb
SHR32ItoR(EDX, 31); //mov sign to lsb
}
//kill register allocation for dst because we write directly to fpuRegs.fpr[_Fd_]
_deleteFPtoXMMreg(_Fd_, 2);
ADD32ItoR(EDX,0x7FFFFFFF); //0x7FFFFFFF if positive, 0x8000 0000 if negative
ADD32ItoR(EDX, 0x7FFFFFFF); //0x7FFFFFFF if positive, 0x8000 0000 if negative
CMP32ItoR(EAX,0x80000000); //If the result is indefinitive
CMOVE32RtoR(EAX,EDX); //Saturate it
CMP32ItoR(EAX, 0x80000000); //If the result is indefinitive
CMOVE32RtoR(EAX, EDX); //Saturate it
//Write the result
MOV32RtoM((uptr)&fpuRegs.fpr[_Fd_], EAX);