mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Merge pull request #1179 from lioncash/casts
Jit_Integer: Get rid of some cast noise in boolX
This commit is contained in:
@ -562,22 +562,25 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
|
|
||||||
if (gpr.R(s).IsImm() && gpr.R(b).IsImm())
|
if (gpr.R(s).IsImm() && gpr.R(b).IsImm())
|
||||||
{
|
{
|
||||||
|
const u32 rs_offset = static_cast<u32>(gpr.R(s).offset);
|
||||||
|
const u32 rb_offset = static_cast<u32>(gpr.R(b).offset);
|
||||||
|
|
||||||
if (inst.SUBOP10 == 28) // andx
|
if (inst.SUBOP10 == 28) // andx
|
||||||
gpr.SetImmediate32(a, (u32)gpr.R(s).offset & (u32)gpr.R(b).offset);
|
gpr.SetImmediate32(a, rs_offset & rb_offset);
|
||||||
else if (inst.SUBOP10 == 476) // nandx
|
else if (inst.SUBOP10 == 476) // nandx
|
||||||
gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset & (u32)gpr.R(b).offset));
|
gpr.SetImmediate32(a, ~(rs_offset & rb_offset));
|
||||||
else if (inst.SUBOP10 == 60) // andcx
|
else if (inst.SUBOP10 == 60) // andcx
|
||||||
gpr.SetImmediate32(a, (u32)gpr.R(s).offset & (~(u32)gpr.R(b).offset));
|
gpr.SetImmediate32(a, rs_offset & (~rb_offset));
|
||||||
else if (inst.SUBOP10 == 444) // orx
|
else if (inst.SUBOP10 == 444) // orx
|
||||||
gpr.SetImmediate32(a, (u32)gpr.R(s).offset | (u32)gpr.R(b).offset);
|
gpr.SetImmediate32(a, rs_offset | rb_offset);
|
||||||
else if (inst.SUBOP10 == 124) // norx
|
else if (inst.SUBOP10 == 124) // norx
|
||||||
gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset | (u32)gpr.R(b).offset));
|
gpr.SetImmediate32(a, ~(rs_offset | rb_offset));
|
||||||
else if (inst.SUBOP10 == 412) // orcx
|
else if (inst.SUBOP10 == 412) // orcx
|
||||||
gpr.SetImmediate32(a, (u32)gpr.R(s).offset | (~(u32)gpr.R(b).offset));
|
gpr.SetImmediate32(a, rs_offset | (~rb_offset));
|
||||||
else if (inst.SUBOP10 == 316) // xorx
|
else if (inst.SUBOP10 == 316) // xorx
|
||||||
gpr.SetImmediate32(a, (u32)gpr.R(s).offset ^ (u32)gpr.R(b).offset);
|
gpr.SetImmediate32(a, rs_offset ^ rb_offset);
|
||||||
else if (inst.SUBOP10 == 284) // eqvx
|
else if (inst.SUBOP10 == 284) // eqvx
|
||||||
gpr.SetImmediate32(a, ~((u32)gpr.R(s).offset ^ (u32)gpr.R(b).offset));
|
gpr.SetImmediate32(a, ~(rs_offset ^ rb_offset));
|
||||||
}
|
}
|
||||||
else if (s == b)
|
else if (s == b)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user