Skip to content

Commit

Permalink
x86/FPU: Use SSE4 pminsd+pminud for sign clamping
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed Dec 24, 2023
1 parent 47ae3ff commit 8ef3656
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions pcsx2/x86/iFPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,13 +342,8 @@ static void fpuFreeIfTemp(int xmmreg)

__fi void fpuFloat3(int regd) // +NaN -> +fMax, -NaN -> -fMax, +Inf -> +fMax, -Inf -> -fMax
{
const int t1reg = _allocTempXMMreg(XMMT_FPS);
xMOVSS(xRegisterSSE(t1reg), xRegisterSSE(regd));
xAND.PS(xRegisterSSE(t1reg), ptr[&s_neg[0]]);
xMIN.SS(xRegisterSSE(regd), ptr[&g_maxvals[0]]);
xMAX.SS(xRegisterSSE(regd), ptr[&g_minvals[0]]);
xOR.PS(xRegisterSSE(regd), xRegisterSSE(t1reg));
_freeXMMreg(t1reg);
xPMIN.SD(xRegisterSSE(regd), ptr128[&g_maxvals[0]]);
xPMIN.UD(xRegisterSSE(regd), ptr128[&g_minvals[0]]);
}

__fi void fpuFloat(int regd) // +/-NaN -> +fMax, +Inf -> +fMax, -Inf -> -fMax
Expand Down

0 comments on commit 8ef3656

Please sign in to comment.