Alexandre Julliard : ntdll: Add support for rep; ret instruction in function epilogs.
Alexandre Julliard
julliard at winehq.org
Tue Mar 13 13:50:34 CDT 2012
Module: wine
Branch: master
Commit: 34c875bf8bd3861f69dedbd7faada1a5c7748d56
URL: http://source.winehq.org/git/wine.git/?a=commit;h=34c875bf8bd3861f69dedbd7faada1a5c7748d56
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Mar 12 18:59:45 2012 +0100
ntdll: Add support for rep;ret instruction in function epilogs.
---
dlls/ntdll/signal_x86_64.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index 12acf94..19d91a0 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -2648,6 +2648,8 @@ static BOOL is_inside_epilog( BYTE *pc )
case 0xc2: /* ret $nn */
case 0xc3: /* ret */
return TRUE;
+ case 0xf3: /* rep; ret (for amd64 prediction bug) */
+ return pc[1] == 0xc3;
/* FIXME: add various jump instructions */
}
return FALSE;
@@ -2702,6 +2704,7 @@ static void interpret_epilog( BYTE *pc, CONTEXT *context, KNONVOLATILE_CONTEXT_P
context->Rsp += sizeof(ULONG64) + *(WORD *)(pc + 1);
return;
case 0xc3: /* ret */
+ case 0xf3: /* rep; ret */
context->Rip = *(ULONG64 *)context->Rsp;
context->Rsp += sizeof(ULONG64);
return;
More information about the wine-cvs
mailing list