x64Emitter: check for immediates in BMI ops

This commit is contained in:
Tillmann Karras 2015-08-14 20:46:23 +02:00
parent 3bc5505272
commit 5e9fe4cd13
1 changed files with 3 additions and 1 deletions

View File

@ -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)
{
CheckFlags();
if (arg.IsImm())
PanicAlert("BMI1/2 instructions don't support immediate operands.");
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;
WriteVEXOp(opPrefix, op, regOp1, regOp2, arg, W, extrabytes);
}