Alexandre Julliard : rpcrt4: Add .seh annotations for x86_64.
Alexandre Julliard
julliard at winehq.org
Wed Aug 21 14:39:32 CDT 2019
Module: wine
Branch: master
Commit: 7592b406d2e1f426cbc65421fe4f0b4bd8da6a08
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7592b406d2e1f426cbc65421fe4f0b4bd8da6a08
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Aug 21 11:28:26 2019 +0200
rpcrt4: Add .seh annotations for x86_64.
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/rpcrt4/cproxy.c | 16 +++++++++-------
dlls/rpcrt4/ndr_stubless.c | 13 ++++++++++---
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c
index 36612be..3b94677 100644
--- a/dlls/rpcrt4/cproxy.c
+++ b/dlls/rpcrt4/cproxy.c
@@ -104,19 +104,21 @@ static inline void init_thunk( struct thunk *thunk, unsigned int index )
extern void call_stubless_func(void);
__ASM_GLOBAL_FUNC(call_stubless_func,
- "movq %rcx,0x8(%rsp)\n\t"
- "movq %rdx,0x10(%rsp)\n\t"
- "movq %r8,0x18(%rsp)\n\t"
- "movq %r9,0x20(%rsp)\n\t"
- "leaq 0x8(%rsp),%r8\n\t" /* &This */
+ "subq $0x38,%rsp\n\t"
+ __ASM_SEH(".seh_stackalloc 0x38\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
+ __ASM_CFI(".cfi_adjust_cfa_offset 0x38\n\t")
+ "movq %rcx,0x40(%rsp)\n\t"
+ "movq %rdx,0x48(%rsp)\n\t"
+ "movq %r8,0x50(%rsp)\n\t"
+ "movq %r9,0x58(%rsp)\n\t"
+ "leaq 0x40(%rsp),%r8\n\t" /* &This */
"movq (%rcx),%rcx\n\t" /* This->lpVtbl */
"movq -0x10(%rcx),%rcx\n\t" /* MIDL_STUBLESS_PROXY_INFO */
"movq 0x10(%rcx),%rdx\n\t" /* info->FormatStringOffset */
"movzwq (%rdx,%r10,2),%rdx\n\t" /* FormatStringOffset[index] */
"addq 8(%rcx),%rdx\n\t" /* info->ProcFormatString + offset */
"movq (%rcx),%rcx\n\t" /* info->pStubDesc */
- "subq $0x38,%rsp\n\t"
- __ASM_CFI(".cfi_adjust_cfa_offset 0x38\n\t")
"movq %xmm1,0x20(%rsp)\n\t"
"movq %xmm2,0x28(%rsp)\n\t"
"movq %xmm3,0x30(%rsp)\n\t"
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c
index 287b0fa..b47ffa9 100644
--- a/dlls/rpcrt4/ndr_stubless.c
+++ b/dlls/rpcrt4/ndr_stubless.c
@@ -1092,13 +1092,18 @@ __ASM_GLOBAL_FUNC(call_server_func,
LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char * args, unsigned int stack_size);
__ASM_GLOBAL_FUNC( call_server_func,
"pushq %rbp\n\t"
+ __ASM_SEH(".seh_pushreg %rbp\n\t")
__ASM_CFI(".cfi_adjust_cfa_offset 8\n\t")
__ASM_CFI(".cfi_rel_offset %rbp,0\n\t")
"movq %rsp,%rbp\n\t"
+ __ASM_SEH(".seh_setframe %rbp,0\n\t")
__ASM_CFI(".cfi_def_cfa_register %rbp\n\t")
"pushq %rsi\n\t"
+ __ASM_SEH(".seh_pushreg %rsi\n\t")
__ASM_CFI(".cfi_rel_offset %rsi,-8\n\t")
"pushq %rdi\n\t"
+ __ASM_SEH(".seh_pushreg %rdi\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
__ASM_CFI(".cfi_rel_offset %rdi,-16\n\t")
"movq %rcx,%rax\n\t" /* function to call */
"movq $32,%rcx\n\t" /* allocate max(32,stack_size) bytes of stack space */
@@ -1854,11 +1859,13 @@ cleanup:
#ifdef __x86_64__
__ASM_GLOBAL_FUNC( NdrAsyncClientCall,
- "movq %r8,0x18(%rsp)\n\t"
- "movq %r9,0x20(%rsp)\n\t"
- "leaq 0x18(%rsp),%r8\n\t"
"subq $0x28,%rsp\n\t"
+ __ASM_SEH(".seh_stackalloc 0x28\n\t")
+ __ASM_SEH(".seh_endprologue\n\t")
__ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t")
+ "movq %r8,0x40(%rsp)\n\t"
+ "movq %r9,0x48(%rsp)\n\t"
+ "leaq 0x40(%rsp),%r8\n\t"
"call " __ASM_NAME("ndr_async_client_call") "\n\t"
"addq $0x28,%rsp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -0x28\n\t")
More information about the wine-cvs
mailing list