https://git.reactos.org/?p=reactos.git;a=commitdiff;h=062a8f20a9fae1f4962886b582d77c04943dc0c4

commit 062a8f20a9fae1f4962886b582d77c04943dc0c4
Author:     Mark Jansen <[email protected]>
AuthorDate: Fri Nov 25 10:45:47 2022 +0100
Commit:     Mark Jansen <[email protected]>
CommitDate: Mon Nov 28 20:12:57 2022 +0100

    [RPCRT4] Sync msvc.S with WINE's inline assembly,
    
    as suggested by Thomas
    
    CORE-18505
---
 dll/win32/rpcrt4/msvc.S | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

diff --git a/dll/win32/rpcrt4/msvc.S b/dll/win32/rpcrt4/msvc.S
index ca7d77430aa..fca5ee5e612 100644
--- a/dll/win32/rpcrt4/msvc.S
+++ b/dll/win32/rpcrt4/msvc.S
@@ -13,24 +13,25 @@ EXTERN _ndr_client_call:PROC
 PUBLIC _call_stubless_func
 _call_stubless_func:
 
-    mov ecx,[esp+4]        /* This Pointer */
-    mov ecx,[ecx]          /* This->lpVtbl */
-    mov ecx,[ecx-8]        /* MIDL_STUBLESS_PROXY_INFO */
-    mov edx,[ecx+8]        /* Info->FormatStringOffset */
-    mov edx,[edx+eax*2]    /* FormatStringOffset[index] */
-    and edx, 0000FFFFh
-    add edx,[ecx+4]        /* info->ProcFormatString + offset */
-    mov eax, [edx+8]       /* arguments size */
-    and eax, 0000FFFFh
+    mov ecx, [esp+4]                /* This Pointer */
+    mov ecx, [ecx]                  /* This->lpVtbl */
+    mov ecx, [ecx-8]                /* MIDL_STUBLESS_PROXY_INFO */
+    mov edx, [ecx+8]                /* Info->FormatStringOffset */
+    movzx edx, word ptr [edx+eax*2] /* FormatStringOffset[index] */
+    add edx, [ecx+4]                /* info->ProcFormatString + offset */
+    movzx eax, byte ptr [edx+1]     /* Oi_flags */
+    and eax, 8                      /* Oi_HAS_RPCFLAGS */
+    shr eax, 1
+    movzx eax, word ptr [edx+eax+4] /* arguments size */
     push eax
-    lea eax, [esp+8]       /* &This */
+    lea eax, [esp+8]                /* &This */
     push eax
-    push edx               /* format string */
-    push [ecx]             /* info->pstubdesc */
+    push edx                        /* format string */
+    push [ecx]                      /* info->pstubdesc */
     call _ndr_client_call
     lea esp, [esp+12]
-    pop edx                /* arguments size */
-    mov ecx, [esp]         /* return address */
+    pop edx                         /* arguments size */
+    mov ecx, [esp]                  /* return address */
     add esp, edx
     jmp ecx
 

Reply via email to