Module: wine Branch: master Commit: 01ecb5834b3c27777ca40e4b977e4917b52e93ed URL: http://source.winehq.org/git/wine.git/?a=commit;h=01ecb5834b3c27777ca40e4b97...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Tue Nov 22 04:03:01 2016 -0200
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
---
dlls/krnl386.exe16/instr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/krnl386.exe16/instr.c b/dlls/krnl386.exe16/instr.c index b0de30f..f59ce90 100644 --- a/dlls/krnl386.exe16/instr.c +++ b/dlls/krnl386.exe16/instr.c @@ -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. */ }