rpcrt4: Export NdrpClientCall2.

This commit is contained in:
Alexandre Julliard 2024-04-17 12:40:59 +02:00
parent 04b829e81b
commit 2fff2c6b4a
4 changed files with 33 additions and 33 deletions

View file

@ -66,16 +66,17 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
"movzwl 4(%edx,%eax),%eax\n\t" /* arguments size */
"pushl %eax\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"leal 8(%esp),%eax\n\t" /* &This */
"pushl $0\n\t" /* fpu_stack */
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"leal 12(%esp),%eax\n\t" /* &This */
"pushl %eax\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"pushl %edx\n\t" /* format string */
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"pushl (%ecx)\n\t" /* info->pStubDesc */
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
"call " __ASM_NAME("ndr_client_call") "\n\t"
"leal 12(%esp),%esp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -12\n\t")
"call " __ASM_STDCALL("NdrpClientCall2",16) "\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -16\n\t")
"popl %edx\n\t" /* arguments size */
__ASM_CFI(".cfi_adjust_cfa_offset -4\n\t")
"movl (%esp),%ecx\n\t" /* return address */
@ -113,7 +114,7 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
"movq %xmm2,0x28(%rsp)\n\t"
"movq %xmm3,0x30(%rsp)\n\t"
"leaq 0x18(%rsp),%r9\n\t" /* fpu_args */
"call " __ASM_NAME("ndr_client_call") "\n\t"
"call " __ASM_NAME("NdrpClientCall2") "\n\t"
"addq $0x38,%rsp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -0x38\n\t")
"ret" );
@ -131,9 +132,12 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
extern void call_stubless_func(void);
__ASM_GLOBAL_FUNC(call_stubless_func,
"push {r0-r3}\n\t"
"mov r2, sp\n\t" /* stack_top */
".seh_save_regs {r0-r3}\n\t"
"push {fp,lr}\n\t"
".seh_save_regs_w {fp,lr}\n\t"
"mov fp, sp\n\t"
".seh_save_sp fp\n\t"
".seh_endprologue\n\t"
"ldr r0, [r0]\n\t" /* This->lpVtbl */
"ldr r0, [r0,#-8]\n\t" /* MIDL_STUBLESS_PROXY_INFO */
"ldr r1, [r0,#8]\n\t" /* info->FormatStringOffset */
@ -141,13 +145,10 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
"ldr ip, [r0,#4]\n\t" /* info->ProcFormatString */
"add r1, ip\n\t" /* info->ProcFormatString + offset */
"ldr r0, [r0]\n\t" /* info->pStubDesc */
#ifdef __SOFTFP__
"mov r3, #0\n\t"
#else
"add r2, sp, #8\n\t" /* stack_top */
"vpush {s0-s15}\n\t" /* store the s0-s15/d0-d7 arguments */
"mov r3, sp\n\t" /* fpu_stack */
#endif
"bl " __ASM_NAME("ndr_client_call") "\n\t"
"bl NdrpClientCall2\n\t"
"mov sp, fp\n\t"
"pop {fp,lr}\n\t"
"add sp, #16\n\t"
@ -164,10 +165,10 @@ __ASM_GLOBAL_FUNC(call_stubless_func,
extern void call_stubless_func(void);
__ASM_GLOBAL_FUNC( call_stubless_func,
"stp x29, x30, [sp, #-0x90]!\n\t"
__ASM_SEH(".seh_save_fplr_x 0x90\n\t")
".seh_save_fplr_x 0x90\n\t"
"mov x29, sp\n\t"
__ASM_SEH(".seh_set_fp\n\t")
__ASM_SEH(".seh_endprologue\n\t")
".seh_set_fp\n\t"
".seh_endprologue\n\t"
"stp d0, d1, [sp, #0x10]\n\t"
"stp d2, d3, [sp, #0x20]\n\t"
"stp d4, d5, [sp, #0x30]\n\t"
@ -184,7 +185,7 @@ __ASM_GLOBAL_FUNC( call_stubless_func,
"ldr x0, [x0]\n\t" /* info->pStubDesc */
"add x2, sp, #0x50\n\t" /* stack */
"add x3, sp, #0x10\n\t" /* fpu_stack */
"bl " __ASM_NAME("ndr_client_call") "\n\t"
"bl NdrpClientCall2\n\t"
"ldp x29, x30, [sp], #0x90\n\t"
"ret" )

View file

@ -700,9 +700,9 @@ static void CALLBACK ndr_client_call_finally(BOOL normal, void *arg)
}
}
/* Helper for ndr_client_call, to factor out the part that may or may not be
/* Helper for NdrpClientCall2, to factor out the part that may or may not be
* guarded by a try/except block. */
static LONG_PTR do_ndr_client_call( const MIDL_STUB_DESC *stub_desc, const PFORMAT_STRING format,
static LONG_PTR ndr_client_call( const MIDL_STUB_DESC *stub_desc, const PFORMAT_STRING format,
const PFORMAT_STRING handle_format, void **stack_top, void **fpu_stack, MIDL_STUB_MESSAGE *stub_msg,
unsigned short procedure_number, unsigned short stack_size, unsigned int number_of_params,
INTERPRETER_OPT_FLAGS Oif_flags, INTERPRETER_OPT_FLAGS2 ext_flags, const NDR_PROC_HEADER *proc_header )
@ -846,8 +846,8 @@ static LONG_PTR do_ndr_client_call( const MIDL_STUB_DESC *stub_desc, const PFORM
return retval;
}
LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat,
void **stack_top, void **fpu_stack )
LONG_PTR WINAPI NdrpClientCall2( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat,
void **stack_top, void **fpu_stack )
{
/* pointer to start of stack where arguments start */
MIDL_STUB_MESSAGE stubMsg;
@ -939,9 +939,9 @@ LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
{
__TRY
{
RetVal = do_ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
RetVal = ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
}
__EXCEPT_ALL
{
@ -958,9 +958,9 @@ LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
{
__TRY
{
RetVal = do_ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
RetVal = ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
}
__EXCEPT_ALL
{
@ -991,9 +991,9 @@ LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pForma
}
else
{
RetVal = do_ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
RetVal = ndr_client_call(pStubDesc, pFormat, pHandleFormat,
stack_top, fpu_stack, &stubMsg, procedure_number, stack_size,
number_of_params, Oif_flags, ext_flags, pProcHeader);
}
TRACE("RetVal = 0x%Ix\n", RetVal);
@ -1011,7 +1011,7 @@ __ASM_GLOBAL_FUNC( NdrClientCall2,
"movq %r9,0x48(%rsp)\n\t"
"leaq 0x40(%rsp),%r8\n\t"
"xorq %r9,%r9\n\t"
"call " __ASM_NAME("ndr_client_call") "\n\t"
"call " __ASM_NAME("NdrpClientCall2") "\n\t"
"addq $0x28,%rsp\n\t"
__ASM_CFI(".cfi_adjust_cfa_offset -0x28\n\t")
"ret" );
@ -1027,7 +1027,7 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2( PMIDL_STUB_DESC desc, PFORMAT_STRING
LONG_PTR ret;
va_start( args, format );
ret = ndr_client_call( desc, format, va_arg( args, void ** ), NULL );
ret = NdrpClientCall2( desc, format, va_arg( args, void ** ), NULL );
va_end( args );
return *(CLIENT_CALL_RETURN *)&ret;
}
@ -2243,7 +2243,7 @@ LONG_PTR CDECL ndr64_client_call( MIDL_STUBLESS_PROXY_INFO *info,
if (retval)
FIXME("Complex return types are not supported.\n");
return ndr_client_call( info->pStubDesc,
return NdrpClientCall2( info->pStubDesc,
syntax_info->ProcString + syntax_info->FmtStringOffset[proc], stack_top, fpu_stack );
}
}

View file

@ -253,8 +253,6 @@ enum stubless_phase
STUBLESS_FREE
};
LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat,
void **stack_top, void **fpu_stack );
LONG_PTR CDECL ndr_async_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat,
void **stack_top );
void client_do_args( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, enum stubless_phase phase,

View file

@ -322,6 +322,7 @@
@ stdcall NdrXmitOrRepAsMarshall(ptr ptr ptr)
@ stdcall NdrXmitOrRepAsMemorySize(ptr ptr)
@ stdcall NdrXmitOrRepAsUnmarshall(ptr ptr ptr long)
@ stdcall -arch=!i386 NdrpClientCall2(ptr ptr ptr ptr)
@ stub NdrpCreateProxy # wxp
@ stub NdrpCreateStub # wxp
@ stub NdrpGetProcFormatString # wxp