krnl386: Defined the SMapLS/UnMapLS_IP_EBP functions explicitly to make life easier for winapi_check.

This commit is contained in:
Alexandre Julliard 2010-06-12 12:08:45 +02:00
parent 40ac96d762
commit 86e2494f9b
1 changed files with 162 additions and 42 deletions

View File

@ -553,65 +553,185 @@ __ASM_STDCALL_FUNC( SUnMapLS, 0,
/*********************************************************************** /***********************************************************************
* SMapLS_IP_EBP_8 (KERNEL32.@) * SMapLS_IP_EBP_8 (KERNEL32.@)
* SMapLS_IP_EBP_12 (KERNEL32.@)
* SMapLS_IP_EBP_16 (KERNEL32.@)
* SMapLS_IP_EBP_20 (KERNEL32.@)
* SMapLS_IP_EBP_24 (KERNEL32.@)
* SMapLS_IP_EBP_28 (KERNEL32.@)
* SMapLS_IP_EBP_32 (KERNEL32.@)
* SMapLS_IP_EBP_36 (KERNEL32.@)
* SMapLS_IP_EBP_40 (KERNEL32.@)
* *
* These functions map linear pointers at [EBP+xxx] to segmented pointers * These functions map linear pointers at [EBP+xxx] to segmented pointers
* and return them. * and return them.
* Win95 uses some kind of alias structs, which it stores in [EBP+x] to * Win95 uses some kind of alias structs, which it stores in [EBP+x] to
* unravel them at SUnMapLS. We just store the segmented pointer there. * unravel them at SUnMapLS. We just store the segmented pointer there.
*/ */
#define DEFINE_SMapLS(n) \ __ASM_STDCALL_FUNC( SMapLS_IP_EBP_8, 0,
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_ ## n, 0, \ "movl 8(%ebp),%eax\n\t"
"movl " #n "(%ebp),%eax\n\t" \ "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t" \ "movl %edx,8(%ebp)\n\t"
"movl %edx," #n "(%ebp)\n\t" \
"ret" ) "ret" )
DEFINE_SMapLS(8) /***********************************************************************
DEFINE_SMapLS(12) * SMapLS_IP_EBP_12 (KERNEL32.@)
DEFINE_SMapLS(16) */
DEFINE_SMapLS(20) __ASM_STDCALL_FUNC( SMapLS_IP_EBP_12, 0,
DEFINE_SMapLS(24) "movl 12(%ebp),%eax\n\t"
DEFINE_SMapLS(28) "call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
DEFINE_SMapLS(32) "movl %edx,12(%ebp)\n\t"
DEFINE_SMapLS(36) "ret" )
DEFINE_SMapLS(40)
/***********************************************************************
* SMapLS_IP_EBP_16 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_16, 0,
"movl 16(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,16(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_20 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_20, 0,
"movl 20(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,20(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_24 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_24, 0,
"movl 24(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,24(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_28 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_28, 0,
"movl 28(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,28(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_32 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_32, 0,
"movl 32(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,32(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_36 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_36, 0,
"movl 36(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,36(%ebp)\n\t"
"ret" )
/***********************************************************************
* SMapLS_IP_EBP_40 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SMapLS_IP_EBP_40, 0,
"movl 40(%ebp),%eax\n\t"
"call " __ASM_NAME("SMapLS") __ASM_STDCALL(4) "\n\t"
"movl %edx,40(%ebp)\n\t"
"ret" )
/*********************************************************************** /***********************************************************************
* SUnMapLS_IP_EBP_8 (KERNEL32.@) * SUnMapLS_IP_EBP_8 (KERNEL32.@)
* SUnMapLS_IP_EBP_12 (KERNEL32.@)
* SUnMapLS_IP_EBP_16 (KERNEL32.@)
* SUnMapLS_IP_EBP_20 (KERNEL32.@)
* SUnMapLS_IP_EBP_24 (KERNEL32.@)
* SUnMapLS_IP_EBP_28 (KERNEL32.@)
* SUnMapLS_IP_EBP_32 (KERNEL32.@)
* SUnMapLS_IP_EBP_36 (KERNEL32.@)
* SUnMapLS_IP_EBP_40 (KERNEL32.@)
*/ */
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_8, 0,
#define DEFINE_SUnMapLS(n) \ "pushl %eax\n\t" /* preserve eax */
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_ ## n, 0, \ "pushl 8(%ebp)\n\t"
"pushl %eax\n\t" /* preserve eax */ \ "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"pushl " #n "(%ebp)\n\t" \ "movl $0,8(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t" \ "popl %eax\n\t"
"movl $0," #n "(%ebp)\n\t" \
"popl %eax\n\t" \
"ret" ) "ret" )
DEFINE_SUnMapLS(8) /***********************************************************************
DEFINE_SUnMapLS(12) * SUnMapLS_IP_EBP_12 (KERNEL32.@)
DEFINE_SUnMapLS(16) */
DEFINE_SUnMapLS(20) __ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_12, 0,
DEFINE_SUnMapLS(24) "pushl %eax\n\t" /* preserve eax */
DEFINE_SUnMapLS(28) "pushl 12(%ebp)\n\t"
DEFINE_SUnMapLS(32) "call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
DEFINE_SUnMapLS(36) "movl $0,12(%ebp)\n\t"
DEFINE_SUnMapLS(40) "popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_16 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_16, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 16(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,16(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_20 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_20, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 20(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,20(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_24 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_24, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 24(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,24(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_28 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_28, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 28(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,28(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_32 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_32, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 32(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,32(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_36 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_36, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 36(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,36(%ebp)\n\t"
"popl %eax\n\t"
"ret" )
/***********************************************************************
* SUnMapLS_IP_EBP_40 (KERNEL32.@)
*/
__ASM_STDCALL_FUNC( SUnMapLS_IP_EBP_40, 0,
"pushl %eax\n\t" /* preserve eax */
"pushl 40(%ebp)\n\t"
"call " __ASM_NAME("UnMapLS") __ASM_STDCALL(4) "\n\t"
"movl $0,40(%ebp)\n\t"
"popl %eax\n\t"
"ret" )