Jit_LoadStoreFloating: Minor tidying

The inst.SIMM_16 change is for readability (though it also fixes a warning about potentially unintended uses of `||`).

The fallback change is because `b` is only meaningful for indexed instructions; this could theoretically lead to unintended fallbacks (but it seems unlikely).
This commit is contained in:
Pokechu22 2023-01-09 18:46:25 -08:00
parent 2995b5e061
commit 497e938c8c
1 changed files with 3 additions and 3 deletions

View File

@ -22,7 +22,7 @@ void Jit64::lfXXX(UGeckoInstruction inst)
bool indexed = inst.OPCD == 31;
bool update = indexed ? !!(inst.SUBOP10 & 0x20) : !!(inst.OPCD & 1);
bool single = indexed ? !(inst.SUBOP10 & 0x40) : !(inst.OPCD & 2);
update &= indexed || inst.SIMM_16;
update &= indexed || (inst.SIMM_16 != 0);
int d = inst.RD;
int a = inst.RA;
@ -93,7 +93,7 @@ void Jit64::stfXXX(UGeckoInstruction inst)
bool indexed = inst.OPCD == 31;
bool update = indexed ? !!(inst.SUBOP10 & 0x20) : !!(inst.OPCD & 1);
bool single = indexed ? !(inst.SUBOP10 & 0x40) : !(inst.OPCD & 2);
update &= indexed || inst.SIMM_16;
update &= indexed || (inst.SIMM_16 != 0);
int s = inst.RS;
int a = inst.RA;
@ -101,7 +101,7 @@ void Jit64::stfXXX(UGeckoInstruction inst)
s32 imm = (s16)inst.SIMM_16;
int accessSize = single ? 32 : 64;
FALLBACK_IF(update && jo.memcheck && a == b);
FALLBACK_IF(update && jo.memcheck && indexed && a == b);
if (single)
{