Commit 411cdeba authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

ntoskrnl: Add emulation for 'mov Ob, AL' and 'mov Ovqp, rAX' instruction.

parent 0b06d4c4
......@@ -695,6 +695,23 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
}
break; /* Unable to emulate it */
}
case 0xa0: /* mov Ob, AL */
case 0xa1: /* mov Ovqp, rAX */
{
BYTE *data = (BYTE *)(long_addr ? *(DWORD64 *)(instr + 1) : *(DWORD *)(instr + 1));
unsigned int data_size = (*instr == 0xa1) ? get_op_size( long_op, rex ) : 1;
unsigned int offset = data - user_shared_data;
len = long_addr ? sizeof(DWORD64) : sizeof(DWORD);
if (offset <= sizeof(KSHARED_USER_DATA) - data_size)
{
memcpy( &context->Rax, wine_user_shared_data + offset, data_size );
context->Rip += prefixlen + len + 1;
return ExceptionContinueExecution;
}
break; /* Unable to emulate it */
}
}
return ExceptionContinueSearch; /* Unable to emulate it */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment