mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 15:49:50 -06:00
Jit64: use BMI1's ANDN for andcx
This commit is contained in:
@ -676,7 +676,12 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
}
|
}
|
||||||
else if (inst.SUBOP10 == 60) // andcx
|
else if (inst.SUBOP10 == 60) // andcx
|
||||||
{
|
{
|
||||||
if (a == b)
|
if (cpu_info.bBMI1 && (gpr.R(b).IsSimpleReg() || a == s))
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(b, true, false);
|
||||||
|
ANDN(32, gpr.RX(a), gpr.RX(b), gpr.R(s));
|
||||||
|
}
|
||||||
|
else if (a == b)
|
||||||
{
|
{
|
||||||
NOT(32, gpr.R(a));
|
NOT(32, gpr.R(a));
|
||||||
AND(32, gpr.R(a), operand);
|
AND(32, gpr.R(a), operand);
|
||||||
@ -744,11 +749,19 @@ void Jit64::boolX(UGeckoInstruction inst)
|
|||||||
needs_test = true;
|
needs_test = true;
|
||||||
}
|
}
|
||||||
else if (inst.SUBOP10 == 60) // andcx
|
else if (inst.SUBOP10 == 60) // andcx
|
||||||
|
{
|
||||||
|
if (cpu_info.bBMI1)
|
||||||
|
{
|
||||||
|
gpr.BindToRegister(b, true, false);
|
||||||
|
ANDN(32, gpr.RX(a), gpr.RX(b), gpr.R(s));
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
MOV(32, gpr.R(a), gpr.R(b));
|
MOV(32, gpr.R(a), gpr.R(b));
|
||||||
NOT(32, gpr.R(a));
|
NOT(32, gpr.R(a));
|
||||||
AND(32, gpr.R(a), gpr.R(s));
|
AND(32, gpr.R(a), gpr.R(s));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (inst.SUBOP10 == 444) // orx
|
else if (inst.SUBOP10 == 444) // orx
|
||||||
{
|
{
|
||||||
MOV(32, gpr.R(a), gpr.R(s));
|
MOV(32, gpr.R(a), gpr.R(s));
|
||||||
|
Reference in New Issue
Block a user