Commit 9f6ff3d5 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Change the DEFINE_REGS_ENTRYPOINT macro to use a number of args instead of a size.

Also assume that all register functions are stdcall.
parent 4986f42b
...@@ -146,12 +146,12 @@ extern HANDLE get_BaseNamedObjects_handle(void); ...@@ -146,12 +146,12 @@ extern HANDLE get_BaseNamedObjects_handle(void);
/* Register functions */ /* Register functions */
#ifdef __i386__ #ifdef __i386__
#define DEFINE_REGS_ENTRYPOINT( name, args, pop_args ) \ #define DEFINE_REGS_ENTRYPOINT( name, args ) \
__ASM_GLOBAL_FUNC( name, \ __ASM_GLOBAL_FUNC( name, \
"pushl %eax\n\t" \ "pushl %eax\n\t" \
"call " __ASM_NAME("__wine_call_from_32_regs") "\n\t" \ "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 ) ".byte 4*" #args ",4*" #args )
#endif #endif
#endif #endif
...@@ -192,7 +192,7 @@ void WINAPI __regs_LogApiThkLSF( LPSTR func, CONTEXT86 *context ) ...@@ -192,7 +192,7 @@ void WINAPI __regs_LogApiThkLSF( LPSTR func, CONTEXT86 *context )
TRACE( "%s\n", debugstr_a(func) ); TRACE( "%s\n", debugstr_a(func) );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( LogApiThkLSF, 4, 4 ) DEFINE_REGS_ENTRYPOINT( LogApiThkLSF, 1 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -205,7 +205,7 @@ void WINAPI __regs_LogApiThkSL( LPSTR func, CONTEXT86 *context ) ...@@ -205,7 +205,7 @@ void WINAPI __regs_LogApiThkSL( LPSTR func, CONTEXT86 *context )
TRACE( "%s\n", debugstr_a(func) ); TRACE( "%s\n", debugstr_a(func) );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( LogApiThkSL, 4, 4 ) DEFINE_REGS_ENTRYPOINT( LogApiThkSL, 1 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -218,7 +218,7 @@ void WINAPI __regs_LogCBThkSL( LPSTR func, CONTEXT86 *context ) ...@@ -218,7 +218,7 @@ void WINAPI __regs_LogCBThkSL( LPSTR func, CONTEXT86 *context )
TRACE( "%s\n", debugstr_a(func) ); TRACE( "%s\n", debugstr_a(func) );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( LogCBThkSL, 4, 4 ) DEFINE_REGS_ENTRYPOINT( LogCBThkSL, 1 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -487,7 +487,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT86 *context ) ...@@ -487,7 +487,7 @@ void WINAPI __regs_QT_Thunk( CONTEXT86 *context )
( OFFSETOF(NtCurrentTeb()->WOW32Reserved) - argsize ); ( OFFSETOF(NtCurrentTeb()->WOW32Reserved) - argsize );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( QT_Thunk, 0, 0 ) DEFINE_REGS_ENTRYPOINT( QT_Thunk, 0 )
#endif #endif
...@@ -555,7 +555,7 @@ void WINAPI __regs_FT_Prolog( CONTEXT86 *context ) ...@@ -555,7 +555,7 @@ void WINAPI __regs_FT_Prolog( CONTEXT86 *context )
*(DWORD *)(context->Ebp - 52) = context->Edx; *(DWORD *)(context->Ebp - 52) = context->Edx;
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( FT_Prolog, 0, 0 ) DEFINE_REGS_ENTRYPOINT( FT_Prolog, 0 )
#endif #endif
/********************************************************************** /**********************************************************************
...@@ -623,7 +623,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT86 *context ) ...@@ -623,7 +623,7 @@ void WINAPI __regs_FT_Thunk( CONTEXT86 *context )
memcpy( oldstack, newstack, argsize ); memcpy( oldstack, newstack, argsize );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( FT_Thunk, 0, 0 ) DEFINE_REGS_ENTRYPOINT( FT_Thunk, 0 )
#endif #endif
#ifdef __i386__ #ifdef __i386__
...@@ -779,7 +779,7 @@ void WINAPI __regs_Common32ThkLS( CONTEXT86 *context ) ...@@ -779,7 +779,7 @@ void WINAPI __regs_Common32ThkLS( CONTEXT86 *context )
context->Esp += LOBYTE(context16.Ebx); context->Esp += LOBYTE(context16.Ebx);
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( Common32ThkLS, 0, 0 ) DEFINE_REGS_ENTRYPOINT( Common32ThkLS, 0 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -836,7 +836,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT86 *context ) ...@@ -836,7 +836,7 @@ void WINAPI __regs_OT_32ThkLSF( CONTEXT86 *context )
( OFFSETOF(NtCurrentTeb()->WOW32Reserved) - argsize ); ( OFFSETOF(NtCurrentTeb()->WOW32Reserved) - argsize );
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( OT_32ThkLSF, 0, 0 ) DEFINE_REGS_ENTRYPOINT( OT_32ThkLSF, 0 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -938,7 +938,7 @@ void WINAPI __regs_FT_PrologPrime( CONTEXT86 *context ) ...@@ -938,7 +938,7 @@ void WINAPI __regs_FT_PrologPrime( CONTEXT86 *context )
context->Eip = (DWORD)relayCode; context->Eip = (DWORD)relayCode;
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( FT_PrologPrime, 0, 0 ) DEFINE_REGS_ENTRYPOINT( FT_PrologPrime, 0 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -970,7 +970,7 @@ void WINAPI __regs_QT_ThunkPrime( CONTEXT86 *context ) ...@@ -970,7 +970,7 @@ void WINAPI __regs_QT_ThunkPrime( CONTEXT86 *context )
context->Eip = (DWORD)relayCode; context->Eip = (DWORD)relayCode;
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( QT_ThunkPrime, 0, 0 ) DEFINE_REGS_ENTRYPOINT( QT_ThunkPrime, 0 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -1113,7 +1113,7 @@ void WINAPI __regs_W32S_BackTo32( CONTEXT86 *context ) ...@@ -1113,7 +1113,7 @@ void WINAPI __regs_W32S_BackTo32( CONTEXT86 *context )
context->Eip = stack32_pop(context); context->Eip = stack32_pop(context);
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( W32S_BackTo32, 0, 0 ) DEFINE_REGS_ENTRYPOINT( W32S_BackTo32, 0 )
#endif #endif
/********************************************************************** /**********************************************************************
...@@ -1230,7 +1230,7 @@ void WINAPI __regs_AllocMappedBuffer( ...@@ -1230,7 +1230,7 @@ void WINAPI __regs_AllocMappedBuffer(
} }
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0, 0 ) DEFINE_REGS_ENTRYPOINT( AllocMappedBuffer, 0 )
#endif #endif
/********************************************************************** /**********************************************************************
...@@ -1255,7 +1255,7 @@ void WINAPI __regs_FreeMappedBuffer( ...@@ -1255,7 +1255,7 @@ void WINAPI __regs_FreeMappedBuffer(
} }
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( FreeMappedBuffer, 0, 0 ) DEFINE_REGS_ENTRYPOINT( FreeMappedBuffer, 0 )
#endif #endif
/********************************************************************** /**********************************************************************
...@@ -1363,7 +1363,7 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT86 *context ) ...@@ -1363,7 +1363,7 @@ void WINAPI __regs_K32Thk1632Prolog( CONTEXT86 *context )
ReleaseThunkLock(&CURRENT_STACK16->entry_point); ReleaseThunkLock(&CURRENT_STACK16->entry_point);
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( K32Thk1632Prolog, 0, 0 ) DEFINE_REGS_ENTRYPOINT( K32Thk1632Prolog, 0 )
#endif #endif
/*********************************************************************** /***********************************************************************
...@@ -1400,7 +1400,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT86 *context ) ...@@ -1400,7 +1400,7 @@ void WINAPI __regs_K32Thk1632Epilog( CONTEXT86 *context )
} }
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( K32Thk1632Epilog, 0, 0 ) DEFINE_REGS_ENTRYPOINT( K32Thk1632Epilog, 0 )
#endif #endif
/********************************************************************* /*********************************************************************
...@@ -2212,7 +2212,7 @@ void WINAPI __regs_CommonUnimpStub( CONTEXT86 *context ) ...@@ -2212,7 +2212,7 @@ void WINAPI __regs_CommonUnimpStub( CONTEXT86 *context )
context->Esp += (context->Ecx & 0x0f) * 4; context->Esp += (context->Ecx & 0x0f) * 4;
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( CommonUnimpStub, 0, 0 ) DEFINE_REGS_ENTRYPOINT( CommonUnimpStub, 0 )
#endif #endif
/********************************************************************** /**********************************************************************
......
...@@ -297,7 +297,7 @@ void WINAPI __regs_VxDCall( DWORD service, CONTEXT86 *context ) ...@@ -297,7 +297,7 @@ void WINAPI __regs_VxDCall( DWORD service, CONTEXT86 *context )
} }
} }
#ifdef DEFINE_REGS_ENTRYPOINT #ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( VxDCall, 4, 4 ) DEFINE_REGS_ENTRYPOINT( VxDCall, 1 )
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment