softjit: Minor tweak to reg order for XCHG.

It's easier to use it in these places, but seems it stalls longer on the
dest reg.
This commit is contained in:
Unknown W. Brackets 2021-11-25 21:27:31 -08:00
parent 7f167c3660
commit 932481d3cd
2 changed files with 2 additions and 2 deletions

View file

@ -1072,7 +1072,7 @@ bool PixelJitCache::Jit_Dither(const PixelFuncID &id) {
regCache_.GrabReg(RCX, PixelRegCache::TEMP1, PixelRegCache::T_GEN, needsSwap, argXReg);
if (needsSwap) {
XCHG(PTRBITS, R(RCX), R(argXReg));
XCHG(PTRBITS, R(argXReg), R(RCX));
if (valueReg == RCX)
valueReg = argXReg;
} else {

View file

@ -493,7 +493,7 @@ bool SamplerJitCache::Jit_GetDXT1Color(const SamplerID &id, int blockSize, int a
// Let's swap the regs in that case.
CMP(32, R(tempReg1), Imm32(2));
FixupBranch skipSwap23 = J_CC(CC_E);
XCHG(32, R(bufwReg), R(tempReg2));
XCHG(32, R(tempReg2), R(bufwReg));
SetJumpTarget(skipSwap23);
// Start off with R, adding together first...