mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 23:59:54 -06:00
Jit64: boolX - Mark locals as const
This commit is contained in:
@ -664,16 +664,16 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
else if (gpr.IsImm(s) || gpr.IsImm(b))
|
else if (gpr.IsImm(s) || gpr.IsImm(b))
|
||||||
{
|
{
|
||||||
auto [i, j] = gpr.IsImm(s) ? std::pair(s, b) : std::pair(b, s);
|
const auto [i, j] = gpr.IsImm(s) ? std::pair(s, b) : std::pair(b, s);
|
||||||
u32 imm = gpr.Imm32(i);
|
u32 imm = gpr.Imm32(i);
|
||||||
|
|
||||||
bool complement_b = (inst.SUBOP10 == 60 /* andcx */) || (inst.SUBOP10 == 412 /* orcx */);
|
bool complement_b = (inst.SUBOP10 == 60 /* andcx */) || (inst.SUBOP10 == 412 /* orcx */);
|
||||||
bool final_not = (inst.SUBOP10 == 476 /* nandx */) || (inst.SUBOP10 == 124 /* norx */);
|
const bool final_not = (inst.SUBOP10 == 476 /* nandx */) || (inst.SUBOP10 == 124 /* norx */);
|
||||||
bool is_and = (inst.SUBOP10 == 28 /* andx */) || (inst.SUBOP10 == 60 /* andcx */) ||
|
const bool is_and = (inst.SUBOP10 == 28 /* andx */) || (inst.SUBOP10 == 60 /* andcx */) ||
|
||||||
(inst.SUBOP10 == 476 /* nandx */);
|
(inst.SUBOP10 == 476 /* nandx */);
|
||||||
bool is_or = (inst.SUBOP10 == 444 /* orx */) || (inst.SUBOP10 == 412 /* orcx */) ||
|
const bool is_or = (inst.SUBOP10 == 444 /* orx */) || (inst.SUBOP10 == 412 /* orcx */) ||
|
||||||
(inst.SUBOP10 == 124 /* norx */);
|
(inst.SUBOP10 == 124 /* norx */);
|
||||||
bool is_xor = (inst.SUBOP10 == 316 /* xorx */) || (inst.SUBOP10 == 284 /* eqvx */);
|
const bool is_xor = (inst.SUBOP10 == 316 /* xorx */) || (inst.SUBOP10 == 284 /* eqvx */);
|
||||||
|
|
||||||
// Precompute complement when possible
|
// Precompute complement when possible
|
||||||
if (complement_b && gpr.IsImm(b) || (inst.SUBOP10 == 284 /* eqvx */))
|
if (complement_b && gpr.IsImm(b) || (inst.SUBOP10 == 284 /* eqvx */))
|
||||||
|
Reference in New Issue
Block a user