Merge pull request #9845 from Sintendo/jit64mtfsfx

Jit64: mtfsfx - Optimized masking
This commit is contained in:
JMC47 2021-06-26 13:20:10 -04:00 committed by GitHub
commit 52fb2fad40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 4 deletions

View File

@ -792,10 +792,13 @@ void Jit64::mtfsfx(UGeckoInstruction inst)
else
MOV(32, R(RSCRATCH), Rb);
MOV(32, R(RSCRATCH2), PPCSTATE(fpscr));
AND(32, R(RSCRATCH), Imm32(mask));
AND(32, R(RSCRATCH2), Imm32(~mask));
OR(32, R(RSCRATCH), R(RSCRATCH2));
if (mask != 0xFFFFFFFF)
{
MOV(32, R(RSCRATCH2), PPCSTATE(fpscr));
AND(32, R(RSCRATCH), Imm32(mask));
AND(32, R(RSCRATCH2), Imm32(~mask));
OR(32, R(RSCRATCH), R(RSCRATCH2));
}
MOV(32, PPCSTATE(fpscr), R(RSCRATCH));
if (inst.FM & 1)