commit
0674e344c4
|
@ -1447,8 +1447,10 @@ void XEmitter::WriteFMA4Op(u8 op, X64Reg dest, X64Reg regOp1, X64Reg regOp2, con
|
||||||
void XEmitter::WriteBMIOp(int size, u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, const OpArg& arg, int extrabytes)
|
void XEmitter::WriteBMIOp(int size, u8 opPrefix, u16 op, X64Reg regOp1, X64Reg regOp2, const OpArg& arg, int extrabytes)
|
||||||
{
|
{
|
||||||
CheckFlags();
|
CheckFlags();
|
||||||
|
if (arg.IsImm())
|
||||||
|
PanicAlert("BMI1/2 instructions don't support immediate operands.");
|
||||||
if (size != 32 && size != 64)
|
if (size != 32 && size != 64)
|
||||||
PanicAlert("VEX GPR instructions only support 32-bit and 64-bit modes!");
|
PanicAlert("BMI1/2 instructions only support 32-bit and 64-bit modes!");
|
||||||
int W = size == 64;
|
int W = size == 64;
|
||||||
WriteVEXOp(opPrefix, op, regOp1, regOp2, arg, W, extrabytes);
|
WriteVEXOp(opPrefix, op, regOp1, regOp2, arg, W, extrabytes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -676,7 +676,11 @@ 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() && !gpr.R(s).IsImm())
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
@ -745,9 +749,16 @@ void Jit64::boolX(UGeckoInstruction inst)
|
||||||
}
|
}
|
||||||
else if (inst.SUBOP10 == 60) // andcx
|
else if (inst.SUBOP10 == 60) // andcx
|
||||||
{
|
{
|
||||||
MOV(32, gpr.R(a), gpr.R(b));
|
if (cpu_info.bBMI1 && gpr.R(b).IsSimpleReg() && !gpr.R(s).IsImm())
|
||||||
NOT(32, gpr.R(a));
|
{
|
||||||
AND(32, gpr.R(a), gpr.R(s));
|
ANDN(32, gpr.RX(a), gpr.RX(b), gpr.R(s));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MOV(32, gpr.R(a), gpr.R(b));
|
||||||
|
NOT(32, gpr.R(a));
|
||||||
|
AND(32, gpr.R(a), gpr.R(s));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (inst.SUBOP10 == 444) // orx
|
else if (inst.SUBOP10 == 444) // orx
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue