Module: wine Branch: master Commit: b6599bd7df87e3e0ade896fd0fd92a504f58f1f5 URL: http://source.winehq.org/git/wine.git/?a=commit;h=b6599bd7df87e3e0ade896fd0f...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Jun 13 12:40:30 2011 +0200
rpcrt4: Add an assembly wrapper to implement the NdrClientCall2 calling convention on x86_64.
---
dlls/rpcrt4/ndr_stubless.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 9591f2d..da895e1 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -913,6 +913,21 @@ done: return RetVal; }
+#ifdef __x86_64__ + +__ASM_GLOBAL_FUNC( NdrClientCall2, + "movq %r8,0x18(%rsp)\n\t" + "movq %r9,0x20(%rsp)\n\t" + "leaq 0x18(%rsp),%r8\n\t" + "subq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") + "call " __ASM_NAME("ndr_client_call") "\n\t" + "addq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -0x28\n\t") + "ret" ); + +#else /* __x86_64__ */ + /*********************************************************************** * NdrClientCall2 [RPCRT4.@] */ @@ -927,6 +942,7 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2( PMIDL_STUB_DESC desc, PFORMAT_STRING return *(CLIENT_CALL_RETURN *)&ret; }
+#endif /* __x86_64__ */
/* Calls a function with the specified arguments, restoring the stack * properly afterwards as we don't know the calling convention of the