kernel: Reimplemented the MapHInst functions in assembly.

This commit is contained in:
Alexandre Julliard 2006-01-13 14:29:30 +01:00
parent 643463b456
commit 068cedc7f2
3 changed files with 40 additions and 30 deletions

View File

@ -790,10 +790,10 @@
@ stdcall LockFileEx(long long long long long ptr) @ stdcall LockFileEx(long long long long long ptr)
@ stdcall LockResource(long) @ stdcall LockResource(long)
@ stdcall MakeCriticalSectionGlobal(ptr) @ stdcall MakeCriticalSectionGlobal(ptr)
@ stdcall -i386 -register MapHInstLS() @ stdcall -i386 -norelay MapHInstLS()
@ stdcall -i386 -register MapHInstLS_PN() @ stdcall -i386 -norelay MapHInstLS_PN()
@ stdcall -i386 -register MapHInstSL() @ stdcall -i386 -norelay MapHInstSL()
@ stdcall -i386 -register MapHInstSL_PN() @ stdcall -i386 -norelay MapHInstSL_PN()
@ stdcall MapHModuleLS(long) @ stdcall MapHModuleLS(long)
@ stdcall MapHModuleSL(long) @ stdcall MapHModuleSL(long)
@ stdcall MapLS(ptr) @ stdcall MapLS(ptr)

View File

@ -374,8 +374,8 @@
469 stub WOAGimmeTitle 469 stub WOAGimmeTitle
470 stub WOADestroyConsole 470 stub WOADestroyConsole
471 pascal GetCurrentProcessId() GetCurrentProcessId 471 pascal GetCurrentProcessId() GetCurrentProcessId
472 pascal -register MapHInstLS() __regs_MapHInstLS 472 pascal -register MapHInstLS() MapHInstLS16
473 pascal -register MapHInstSL() __regs_MapHInstSL 473 pascal -register MapHInstSL() MapHInstSL16
474 pascal CloseW32Handle(long) CloseHandle 474 pascal CloseW32Handle(long) CloseHandle
475 pascal -ret16 GetTEBSelectorFS() GetTEBSelectorFS16 475 pascal -ret16 GetTEBSelectorFS() GetTEBSelectorFS16
476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle 476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle

View File

@ -2138,47 +2138,57 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod)
} }
/*************************************************************************** /***************************************************************************
* MapHInstLS (KERNEL32.@)
* MapHInstLS (KERNEL.472) * MapHInstLS (KERNEL.472)
*/ */
void WINAPI __regs_MapHInstLS( CONTEXT86 *context ) void WINAPI MapHInstLS16( CONTEXT86 *context )
{ {
context->Eax = MapHModuleLS( (HMODULE)context->Eax ); context->Eax = MapHModuleLS( (HMODULE)context->Eax );
} }
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstLS, 0, 0 );
#endif
/*************************************************************************** /***************************************************************************
* MapHInstSL (KERNEL32.@)
* MapHInstSL (KERNEL.473) * MapHInstSL (KERNEL.473)
*/ */
void WINAPI __regs_MapHInstSL( CONTEXT86 *context ) void WINAPI MapHInstSL16( CONTEXT86 *context )
{ {
context->Eax = (DWORD)MapHModuleSL( context->Eax ); context->Eax = (DWORD)MapHModuleSL( context->Eax );
} }
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstSL, 0, 0 ); #ifdef __i386__
#endif
/***************************************************************************
* MapHInstLS (KERNEL32.@)
*/
__ASM_GLOBAL_FUNC( MapHInstLS,
"pushl %eax\n\t"
"call " __ASM_NAME("MapHModuleLS") "\n\t"
"ret" );
/***************************************************************************
* MapHInstSL (KERNEL32.@)
*/
__ASM_GLOBAL_FUNC( MapHInstSL,
"pushl %eax\n\t"
"call " __ASM_NAME("MapHModuleSL") "\n\t"
"ret" );
/*************************************************************************** /***************************************************************************
* MapHInstLS_PN (KERNEL32.@) * MapHInstLS_PN (KERNEL32.@)
*/ */
void WINAPI __regs_MapHInstLS_PN( CONTEXT86 *context ) __ASM_GLOBAL_FUNC( MapHInstLS_PN,
{ "testl %eax,%eax\n\t"
if (context->Eax) context->Eax = MapHModuleLS( (HMODULE)context->Eax ); "jz 1f\n\t"
} "pushl %eax\n\t"
#ifdef DEFINE_REGS_ENTRYPOINT "call " __ASM_NAME("MapHModuleLS") "\n"
DEFINE_REGS_ENTRYPOINT( MapHInstLS_PN, 0, 0 ); "1:\tret" );
#endif
/*************************************************************************** /***************************************************************************
* MapHInstSL_PN (KERNEL32.@) * MapHInstSL_PN (KERNEL32.@)
*/ */
void WINAPI __regs_MapHInstSL_PN( CONTEXT86 *context ) __ASM_GLOBAL_FUNC( MapHInstSL_PN,
{ "andl $0xffff,%eax\n\t"
if (context->Eax) context->Eax = (DWORD)MapHModuleSL( context->Eax ); "jz 1f\n\t"
} "pushl %eax\n\t"
#ifdef DEFINE_REGS_ENTRYPOINT "call " __ASM_NAME("MapHModuleSL") "\n"
DEFINE_REGS_ENTRYPOINT( MapHInstSL_PN, 0, 0 ); "1:\tret" );
#endif
#endif /* __i386__ */