Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d303d9dc
Commit
d303d9dc
authored
Jun 14, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Add appropriate stdcall decorations to assembly functions.
parent
5c4612b3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
29 deletions
+29
-29
ne_module.c
dlls/kernel32/ne_module.c
+8
-8
process.c
dlls/kernel32/process.c
+2
-2
selector.c
dlls/kernel32/selector.c
+9
-9
sync.c
dlls/kernel32/sync.c
+5
-5
thread.c
dlls/kernel32/thread.c
+4
-4
thunk.c
dlls/kernel32/thunk.c
+1
-1
No files found.
dlls/kernel32/ne_module.c
View file @
d303d9dc
...
...
@@ -2210,37 +2210,37 @@ void WINAPI MapHInstSL16( CONTEXT86 *context )
/***************************************************************************
* MapHInstLS (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
MapHInstLS
,
__ASM_
STDCALL_FUNC
(
MapHInstLS
,
0
,
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleLS"
)
"
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleLS"
)
__ASM_STDCALL
(
4
)
"
\n\t
"
"ret"
)
/***************************************************************************
* MapHInstSL (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
MapHInstSL
,
__ASM_
STDCALL_FUNC
(
MapHInstSL
,
0
,
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleSL"
)
"
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleSL"
)
__ASM_STDCALL
(
4
)
"
\n\t
"
"ret"
)
/***************************************************************************
* MapHInstLS_PN (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
MapHInstLS_PN
,
__ASM_
STDCALL_FUNC
(
MapHInstLS_PN
,
0
,
"testl %eax,%eax
\n\t
"
"jz 1f
\n\t
"
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleLS"
)
"
\n
"
"call "
__ASM_NAME
(
"MapHModuleLS"
)
__ASM_STDCALL
(
4
)
"
\n
"
"1:
\t
ret"
)
/***************************************************************************
* MapHInstSL_PN (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
MapHInstSL_PN
,
__ASM_
STDCALL_FUNC
(
MapHInstSL_PN
,
0
,
"andl $0xffff,%eax
\n\t
"
"jz 1f
\n\t
"
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"MapHModuleSL"
)
"
\n
"
"call "
__ASM_NAME
(
"MapHModuleSL"
)
__ASM_STDCALL
(
4
)
"
\n
"
"1:
\t
ret"
)
#endif
/* __i386__ */
dlls/kernel32/process.c
View file @
d303d9dc
...
...
@@ -2215,13 +2215,13 @@ BOOL WINAPI TerminateProcess( HANDLE handle, DWORD exit_code )
* Nothing.
*/
#ifdef __i386__
__ASM_
GLOBAL_FUNC
(
ExitProcess
,
/* Shrinker depend on this particular ExitProcess implementation */
__ASM_
STDCALL_FUNC
(
ExitProcess
,
4
,
/* Shrinker depend on this particular ExitProcess implementation */
"pushl %ebp
\n\t
"
".byte 0x8B, 0xEC
\n\t
"
/* movl %esp, %ebp */
".byte 0x6A, 0x00
\n\t
"
/* pushl $0 */
".byte 0x68, 0x00, 0x00, 0x00, 0x00
\n\t
"
/* pushl $0 - 4 bytes immediate */
"pushl 8(%ebp)
\n\t
"
"call "
__ASM_NAME
(
"process_ExitProcess"
)
"
\n\t
"
"call "
__ASM_NAME
(
"process_ExitProcess"
)
__ASM_STDCALL
(
4
)
"
\n\t
"
"leave
\n\t
"
"ret $4"
)
...
...
dlls/kernel32/selector.c
View file @
d303d9dc
...
...
@@ -565,7 +565,7 @@ LPVOID WINAPI MapSLFix( SEGPTR sptr )
* Must not change EAX, hence defined as asm function.
*/
#ifdef __i386__
__ASM_
GLOBAL_FUNC
(
UnMapSLFixArray
,
"ret $8"
)
__ASM_
STDCALL_FUNC
(
UnMapSLFixArray
,
8
,
"ret $8"
)
#endif
...
...
@@ -595,22 +595,22 @@ BOOL WINAPI GetThreadSelectorEntry( HANDLE hthread, DWORD sel, LPLDT_ENTRY ldten
/***********************************************************************
* SMapLS (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
SMapLS
,
__ASM_
STDCALL_FUNC
(
SMapLS
,
0
,
"xor %edx,%edx
\n\t
"
"testl $0xffff0000,%eax
\n\t
"
"jz 1f
\n\t
"
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"MapLS"
)
"
\n\t
"
"call "
__ASM_NAME
(
"MapLS"
)
__ASM_STDCALL
(
4
)
"
\n\t
"
"movl %eax,%edx
\n
"
"1:
\t
ret"
)
/***********************************************************************
* SUnMapLS (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
SUnMapLS
,
__ASM_
STDCALL_FUNC
(
SUnMapLS
,
0
,
"pushl %eax
\n\t
"
/* preserve eax */
"pushl %eax
\n\t
"
"call "
__ASM_NAME
(
"UnMapLS"
)
"
\n\t
"
"call "
__ASM_NAME
(
"UnMapLS"
)
__ASM_STDCALL
(
4
)
"
\n\t
"
"popl %eax
\n\t
"
"ret"
)
...
...
@@ -631,9 +631,9 @@ __ASM_GLOBAL_FUNC( SUnMapLS,
* unravel them at SUnMapLS. We just store the segmented pointer there.
*/
#define DEFINE_SMapLS(n) \
__ASM_
GLOBAL_FUNC( SMapLS_IP_EBP_ ## n
, \
__ASM_
STDCALL_FUNC( SMapLS_IP_EBP_ ## n, 0
, \
"movl " #n "(%ebp),%eax\n\t" \
"call " __ASM_NAME("SMapLS") "\n\t" \
"call " __ASM_NAME("SMapLS")
__ASM_STDCALL(4)
"\n\t" \
"movl %edx," #n "(%ebp)\n\t" \
"ret" )
...
...
@@ -661,10 +661,10 @@ DEFINE_SMapLS(40)
*/
#define DEFINE_SUnMapLS(n) \
__ASM_
GLOBAL_FUNC( SUnMapLS_IP_EBP_ ## n
, \
__ASM_
STDCALL_FUNC( SUnMapLS_IP_EBP_ ## n, 0
, \
"pushl %eax\n\t"
/* preserve eax */
\
"pushl " #n "(%ebp)\n\t" \
"call " __ASM_NAME("UnMapLS") "\n\t" \
"call " __ASM_NAME("UnMapLS")
__ASM_STDCALL(4)
"\n\t" \
"movl $0," #n "(%ebp)\n\t" \
"popl %eax\n\t" \
"ret" )
...
...
dlls/kernel32/sync.c
View file @
d303d9dc
...
...
@@ -2275,7 +2275,7 @@ BOOL WINAPI BindIoCompletionCallback( HANDLE FileHandle, LPOVERLAPPED_COMPLETION
* InterlockedCompareExchange (KERNEL32.@)
*/
/* LONG WINAPI InterlockedCompareExchange( PLONG dest, LONG xchg, LONG compare ); */
__ASM_
GLOBAL_FUNC
(
InterlockedCompareExchange
,
__ASM_
STDCALL_FUNC
(
InterlockedCompareExchange
,
12
,
"movl 12(%esp),%eax
\n\t
"
"movl 8(%esp),%ecx
\n\t
"
"movl 4(%esp),%edx
\n\t
"
...
...
@@ -2286,7 +2286,7 @@ __ASM_GLOBAL_FUNC(InterlockedCompareExchange,
* InterlockedExchange (KERNEL32.@)
*/
/* LONG WINAPI InterlockedExchange( PLONG dest, LONG val ); */
__ASM_
GLOBAL_FUNC
(
InterlockedExchange
,
__ASM_
STDCALL_FUNC
(
InterlockedExchange
,
8
,
"movl 8(%esp),%eax
\n\t
"
"movl 4(%esp),%edx
\n\t
"
"lock; xchgl %eax,(%edx)
\n\t
"
...
...
@@ -2296,7 +2296,7 @@ __ASM_GLOBAL_FUNC(InterlockedExchange,
* InterlockedExchangeAdd (KERNEL32.@)
*/
/* LONG WINAPI InterlockedExchangeAdd( PLONG dest, LONG incr ); */
__ASM_
GLOBAL_FUNC
(
InterlockedExchangeAdd
,
__ASM_
STDCALL_FUNC
(
InterlockedExchangeAdd
,
8
,
"movl 8(%esp),%eax
\n\t
"
"movl 4(%esp),%edx
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
...
...
@@ -2306,7 +2306,7 @@ __ASM_GLOBAL_FUNC(InterlockedExchangeAdd,
* InterlockedIncrement (KERNEL32.@)
*/
/* LONG WINAPI InterlockedIncrement( PLONG dest ); */
__ASM_
GLOBAL_FUNC
(
InterlockedIncrement
,
__ASM_
STDCALL_FUNC
(
InterlockedIncrement
,
4
,
"movl 4(%esp),%edx
\n\t
"
"movl $1,%eax
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
...
...
@@ -2316,7 +2316,7 @@ __ASM_GLOBAL_FUNC(InterlockedIncrement,
/***********************************************************************
* InterlockedDecrement (KERNEL32.@)
*/
__ASM_
GLOBAL_FUNC
(
InterlockedDecrement
,
__ASM_
STDCALL_FUNC
(
InterlockedDecrement
,
4
,
"movl 4(%esp),%edx
\n\t
"
"movl $-1,%eax
\n\t
"
"lock; xaddl %eax,(%edx)
\n\t
"
...
...
dlls/kernel32/thread.c
View file @
d303d9dc
...
...
@@ -568,7 +568,7 @@ HANDLE WINAPI GetCurrentThread(void)
* SetLastError (KERNEL32.@)
*/
/* void WINAPI SetLastError( DWORD error ); */
__ASM_
GLOBAL_FUNC
(
SetLastError
,
__ASM_
STDCALL_FUNC
(
SetLastError
,
4
,
"movl 4(%esp),%eax
\n\t
"
".byte 0x64
\n\t
"
"movl %eax,0x34
\n\t
"
...
...
@@ -579,21 +579,21 @@ __ASM_GLOBAL_FUNC( SetLastError,
* GetLastError (KERNEL32.@)
*/
/* DWORD WINAPI GetLastError(void); */
__ASM_
GLOBAL_FUNC
(
GetLastError
,
".byte 0x64
\n\t
movl 0x34,%eax
\n\t
ret"
)
__ASM_
STDCALL_FUNC
(
GetLastError
,
0
,
".byte 0x64
\n\t
movl 0x34,%eax
\n\t
ret"
)
/***********************************************************************
* GetCurrentProcessId (KERNEL.471)
* GetCurrentProcessId (KERNEL32.@)
*/
/* DWORD WINAPI GetCurrentProcessId(void) */
__ASM_
GLOBAL_FUNC
(
GetCurrentProcessId
,
".byte 0x64
\n\t
movl 0x20,%eax
\n\t
ret"
)
__ASM_
STDCALL_FUNC
(
GetCurrentProcessId
,
0
,
".byte 0x64
\n\t
movl 0x20,%eax
\n\t
ret"
)
/***********************************************************************
* GetCurrentThreadId (KERNEL.462)
* GetCurrentThreadId (KERNEL32.@)
*/
/* DWORD WINAPI GetCurrentThreadId(void) */
__ASM_
GLOBAL_FUNC
(
GetCurrentThreadId
,
".byte 0x64
\n\t
movl 0x24,%eax
\n\t
ret"
)
__ASM_
STDCALL_FUNC
(
GetCurrentThreadId
,
0
,
".byte 0x64
\n\t
movl 0x24,%eax
\n\t
ret"
)
#else
/* __i386__ */
...
...
dlls/kernel32/thunk.c
View file @
d303d9dc
...
...
@@ -645,7 +645,7 @@ DEFINE_REGS_ENTRYPOINT( FT_Thunk, 0 )
"leave\n\t"
#define DEFINE_FT_Exit(n) \
__ASM_
GLOBAL_FUNC( FT_Exit ## n
, FT_EXIT_RESTORE_REGS "ret $" #n )
__ASM_
STDCALL_FUNC( FT_Exit ## n, 0
, FT_EXIT_RESTORE_REGS "ret $" #n )
DEFINE_FT_Exit
(
0
)
DEFINE_FT_Exit
(
4
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment