Paul Gofman : ntdll: Add PE frame handling to KiUserExceptionDispatcher() on x64.
Alexandre Julliard
julliard at winehq.org
Thu Jul 2 15:04:32 CDT 2020
Module: wine
Branch: master
Commit: c02b63fb60458ec750e5991a7491235861c40061
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c02b63fb60458ec750e5991a7491235861c40061
Author: Paul Gofman <pgofman at codeweavers.com>
Date: Thu Jul 2 15:34:47 2020 +0300
ntdll: Add PE frame handling to KiUserExceptionDispatcher() on x64.
Signed-off-by: Paul Gofman <pgofman at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/signal_x86_64.c | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c
index b575d63857..dde0bb7339 100644
--- a/dlls/ntdll/signal_x86_64.c
+++ b/dlls/ntdll/signal_x86_64.c
@@ -588,15 +588,22 @@ __ASM_GLOBAL_FUNC( KiUserExceptionDispatcher,
"mov %rbp,-0x10(%rcx)\n\t"
"mov %rdi,-0x18(%rcx)\n\t"
"mov %rsi,-0x20(%rcx)\n\t"
- "mov %rcx,%rbp\n\t"
+ "lea -0x10(%rcx),%rbp\n\t"
"mov %rsp,%rdx\n\t" /* context */
"lea 0x4f0(%rsp),%rcx\n\t" /* rec */
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
+ __ASM_SEH(".seh_pushreg %rdi\n\t")
+ __ASM_SEH(".seh_pushreg %rsi\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+
__ASM_CFI(".cfi_signal_frame\n\t")
- __ASM_CFI(".cfi_def_cfa %rbp,0\n\t")
- __ASM_CFI(".cfi_rel_offset %rip,-0x8\n\t")
- __ASM_CFI(".cfi_rel_offset %rbp,-0x10\n\t")
- __ASM_CFI(".cfi_rel_offset %rdi,-0x18\n\t")
- __ASM_CFI(".cfi_rel_offset %rsi,-0x20\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x10\n\t")
+ __ASM_CFI(".cfi_def_cfa %rbp,0x10\n\t")
+ __ASM_CFI(".cfi_rel_offset %rip,0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rbp,0x0\n\t")
+ __ASM_CFI(".cfi_rel_offset %rdi,-0x8\n\t")
+ __ASM_CFI(".cfi_rel_offset %rsi,-0x10\n\t")
"call " __ASM_NAME("dispatch_exception") "\n\t"
"int3")
More information about the wine-cvs
mailing list