Sebastian Lackner : ntoskrnl: Add emulation for 'mov Ob, AL' and 'mov Ovqp , rAX' instruction.
Alexandre Julliard
julliard at wine.codeweavers.com
Fri Jun 19 07:19:14 CDT 2015
Module: wine
Branch: master
Commit: 411cdebaede4274d43e1ad4d1b3ada15321b1f6f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=411cdebaede4274d43e1ad4d1b3ada15321b1f6f
Author: Sebastian Lackner <sebastian at fds-team.de>
Date: Fri Jun 19 04:07:08 2015 +0200
ntoskrnl: Add emulation for 'mov Ob, AL' and 'mov Ovqp, rAX' instruction.
---
dlls/ntoskrnl.exe/instr.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c
index 5a469cf..7684b24 100644
--- a/dlls/ntoskrnl.exe/instr.c
+++ b/dlls/ntoskrnl.exe/instr.c
@@ -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 */
}
More information about the wine-cvs
mailing list