Commit 01ecb583 authored by Bruno Jesus's avatar Bruno Jesus Committed by Alexandre Julliard

krnl386.exe16: Honour segment prefix override for outs[bwd] instruction.

parent 02fa1d4c
......@@ -645,14 +645,17 @@ DWORD __wine_emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
(long_addr ? context->Ecx : LOWORD(context->Ecx)) : 1;
int opsize = (typ & 1) ? (long_op ? 4 : 2) : 1;
int step = (context->EFlags & 0x400) ? -opsize : +opsize;
int seg = outp ? context->SegDs : context->SegEs; /* FIXME: is this right? */
int seg;
if (outp)
{
/* Check if there is a segment prefix override and honour it */
seg = segprefix == -1 ? context->SegDs : segprefix;
/* FIXME: Check segment is readable. */
}
else
{
seg = context->SegEs;
/* FIXME: Check segment is writable. */
}
......
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