}
/* With a memory operand, fetch the mask register in use (if any). */
- if ( ea.type == OP_MEM && evex.opmsk )
+ if ( ea.type == OP_MEM && evex.opmsk &&
+ _get_fpu(fpu_type = X86EMUL_FPU_opmask, ctxt, ops) == X86EMUL_OKAY )
{
uint8_t *stb = get_stub(stub);
fault_suppression = true;
}
+ if ( fpu_type == X86EMUL_FPU_opmask )
+ {
+ /* Squash (side) effects of the _get_fpu() above. */
+ x86_emul_reset_event(ctxt);
+ put_fpu(X86EMUL_FPU_opmask, false, state, ctxt, ops);
+ fpu_type = X86EMUL_FPU_none;
+ }
+
/* Decode (but don't fetch) the destination operand: register or memory. */
switch ( d & DstMask )
{