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

Signed-off-by: Bruno Jesus <00cpxxx@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Bruno Jesus 2016-11-22 04:03:01 -02:00 committed by Alexandre Julliard
parent 02fa1d4cc2
commit 01ecb5834b
1 changed files with 4 additions and 1 deletions

View File

@ -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. */
}