Store a relative pointer for registry entry points to avoid some text
relocations.
This commit is contained in:
parent
7da043f869
commit
efcc2b83d8
|
@ -675,11 +675,13 @@ void WINAPI __regs_RELAY_CallFrom32Regs( CONTEXT86 *context )
|
|||
args_copy[nb_args] = (int)context; /* append context argument */
|
||||
if (relay->ret == 0xc3) /* cdecl */
|
||||
{
|
||||
call_cdecl_function( *(LONGLONG_CPROC *)(entry_point + 5), nb_args+1, args_copy );
|
||||
call_cdecl_function( (LONGLONG_CPROC)(entry_point + 5 + *(DWORD *)(entry_point + 5)),
|
||||
nb_args+1, args_copy );
|
||||
}
|
||||
else /* stdcall */
|
||||
{
|
||||
call_stdcall_function( *(LONGLONG_FARPROC *)(entry_point + 5), nb_args+1, args_copy );
|
||||
call_stdcall_function( (LONGLONG_FARPROC)(entry_point + 5 + *(DWORD *)(entry_point + 5)),
|
||||
nb_args+1, args_copy );
|
||||
}
|
||||
|
||||
if (TRACE_ON(relay))
|
||||
|
|
|
@ -241,7 +241,7 @@ struct statvfs
|
|||
#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \
|
||||
__ASM_GLOBAL_FUNC( name, \
|
||||
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \
|
||||
".long " __ASM_NAME("__regs_") #name "\n\t" \
|
||||
".long " __ASM_NAME("__regs_") #name "-.\n\t" \
|
||||
".byte " #args "," #pop_args )
|
||||
/* FIXME: add support for other CPUs */
|
||||
#endif /* __i386__ */
|
||||
|
|
|
@ -1012,7 +1012,8 @@ static void BuildCallFrom32Regs( FILE *outfile )
|
|||
|
||||
/* Call the entry point */
|
||||
|
||||
fprintf( outfile, "\tcall *0(%%ebx)\n" );
|
||||
fprintf( outfile, "\taddl (%%ebx),%%ebx\n" );
|
||||
fprintf( outfile, "\tcall *%%ebx\n" );
|
||||
fprintf( outfile, "\tleal -%d(%%ebp),%%ecx\n", STACK_SPACE );
|
||||
|
||||
/* Restore the context structure */
|
||||
|
|
Loading…
Reference in New Issue