Commit 068cedc7 authored by Alexandre Julliard's avatar Alexandre Julliard

kernel: Reimplemented the MapHInst functions in assembly.

parent 643463b4
......@@ -790,10 +790,10 @@
@ stdcall LockFileEx(long long long long long ptr)
@ stdcall LockResource(long)
@ stdcall MakeCriticalSectionGlobal(ptr)
@ stdcall -i386 -register MapHInstLS()
@ stdcall -i386 -register MapHInstLS_PN()
@ stdcall -i386 -register MapHInstSL()
@ stdcall -i386 -register MapHInstSL_PN()
@ stdcall -i386 -norelay MapHInstLS()
@ stdcall -i386 -norelay MapHInstLS_PN()
@ stdcall -i386 -norelay MapHInstSL()
@ stdcall -i386 -norelay MapHInstSL_PN()
@ stdcall MapHModuleLS(long)
@ stdcall MapHModuleSL(long)
@ stdcall MapLS(ptr)
......
......@@ -374,8 +374,8 @@
469 stub WOAGimmeTitle
470 stub WOADestroyConsole
471 pascal GetCurrentProcessId() GetCurrentProcessId
472 pascal -register MapHInstLS() __regs_MapHInstLS
473 pascal -register MapHInstSL() __regs_MapHInstSL
472 pascal -register MapHInstLS() MapHInstLS16
473 pascal -register MapHInstSL() MapHInstSL16
474 pascal CloseW32Handle(long) CloseHandle
475 pascal -ret16 GetTEBSelectorFS() GetTEBSelectorFS16
476 pascal ConvertToGlobalHandle(long) ConvertToGlobalHandle
......
......@@ -2138,47 +2138,57 @@ HMODULE WINAPI MapHModuleSL(HMODULE16 hmod)
}
/***************************************************************************
* MapHInstLS (KERNEL32.@)
* MapHInstLS (KERNEL.472)
*/
void WINAPI __regs_MapHInstLS( CONTEXT86 *context )
void WINAPI MapHInstLS16( CONTEXT86 *context )
{
context->Eax = MapHModuleLS( (HMODULE)context->Eax );
}
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstLS, 0, 0 );
#endif
/***************************************************************************
* MapHInstSL (KERNEL32.@)
* MapHInstSL (KERNEL.473)
*/
void WINAPI __regs_MapHInstSL( CONTEXT86 *context )
void WINAPI MapHInstSL16( CONTEXT86 *context )
{
context->Eax = (DWORD)MapHModuleSL( context->Eax );
}
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstSL, 0, 0 );
#endif
#ifdef __i386__
/***************************************************************************
* 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.@)
*/
void WINAPI __regs_MapHInstLS_PN( CONTEXT86 *context )
{
if (context->Eax) context->Eax = MapHModuleLS( (HMODULE)context->Eax );
}
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstLS_PN, 0, 0 );
#endif
__ASM_GLOBAL_FUNC( MapHInstLS_PN,
"testl %eax,%eax\n\t"
"jz 1f\n\t"
"pushl %eax\n\t"
"call " __ASM_NAME("MapHModuleLS") "\n"
"1:\tret" );
/***************************************************************************
* MapHInstSL_PN (KERNEL32.@)
*/
void WINAPI __regs_MapHInstSL_PN( CONTEXT86 *context )
{
if (context->Eax) context->Eax = (DWORD)MapHModuleSL( context->Eax );
}
#ifdef DEFINE_REGS_ENTRYPOINT
DEFINE_REGS_ENTRYPOINT( MapHInstSL_PN, 0, 0 );
#endif
__ASM_GLOBAL_FUNC( MapHInstSL_PN,
"andl $0xffff,%eax\n\t"
"jz 1f\n\t"
"pushl %eax\n\t"
"call " __ASM_NAME("MapHModuleSL") "\n"
"1:\tret" );
#endif /* __i386__ */
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