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
52bce47b
Commit
52bce47b
authored
Jan 10, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel: Implement FT_Exit directly in assembly to avoid the overhead
of register functions.
parent
ca0246fb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
41 deletions
+25
-41
kernel32.spec
dlls/kernel/kernel32.spec
+15
-15
thunk.c
dlls/kernel/thunk.c
+10
-26
No files found.
dlls/kernel/kernel32.spec
View file @
52bce47b
...
...
@@ -348,21 +348,21 @@
@ stub ExpungeConsoleCommandHistoryA
@ stub ExpungeConsoleCommandHistoryW
@ stub ExtendVirtualBuffer
@ stdcall -i386 -
register
FT_Exit0()
@ stdcall -i386 -
register
FT_Exit12()
@ stdcall -i386 -
register
FT_Exit16()
@ stdcall -i386 -
register
FT_Exit20()
@ stdcall -i386 -
register
FT_Exit24()
@ stdcall -i386 -
register
FT_Exit28()
@ stdcall -i386 -
register
FT_Exit32()
@ stdcall -i386 -
register
FT_Exit36()
@ stdcall -i386 -
register
FT_Exit40()
@ stdcall -i386 -
register
FT_Exit44()
@ stdcall -i386 -
register
FT_Exit48()
@ stdcall -i386 -
register
FT_Exit4()
@ stdcall -i386 -
register
FT_Exit52()
@ stdcall -i386 -
register
FT_Exit56()
@ stdcall -i386 -
register
FT_Exit8()
@ stdcall -i386 -
norelay
FT_Exit0()
@ stdcall -i386 -
norelay
FT_Exit12()
@ stdcall -i386 -
norelay
FT_Exit16()
@ stdcall -i386 -
norelay
FT_Exit20()
@ stdcall -i386 -
norelay
FT_Exit24()
@ stdcall -i386 -
norelay
FT_Exit28()
@ stdcall -i386 -
norelay
FT_Exit32()
@ stdcall -i386 -
norelay
FT_Exit36()
@ stdcall -i386 -
norelay
FT_Exit40()
@ stdcall -i386 -
norelay
FT_Exit44()
@ stdcall -i386 -
norelay
FT_Exit48()
@ stdcall -i386 -
norelay
FT_Exit4()
@ stdcall -i386 -
norelay
FT_Exit52()
@ stdcall -i386 -
norelay
FT_Exit56()
@ stdcall -i386 -
norelay
FT_Exit8()
@ stdcall -i386 -register FT_Prolog()
@ stdcall -i386 -register FT_Thunk()
@ stdcall FatalAppExitA(long str)
...
...
dlls/kernel/thunk.c
View file @
52bce47b
...
...
@@ -626,6 +626,8 @@ void WINAPI __regs_FT_Thunk( CONTEXT86 *context )
DEFINE_REGS_ENTRYPOINT
(
FT_Thunk
,
0
,
0
);
#endif
#ifdef __i386__
/***********************************************************************
* FT_Exit0 (KERNEL32.@)
* FT_Exit4 (KERNEL32.@)
...
...
@@ -651,33 +653,15 @@ DEFINE_REGS_ENTRYPOINT( FT_Thunk, 0, 0 );
* and perform a return to the CALLER of the thunk code (while removing
* the given number of arguments from the caller's stack).
*/
static
inline
void
FT_Exit
(
CONTEXT86
*
context
)
{
/* Return value is in EBX */
context
->
Eax
=
context
->
Ebx
;
/* Restore EBX, ESI, and EDI registers */
context
->
Ebx
=
*
(
DWORD
*
)(
context
->
Ebp
-
4
);
context
->
Esi
=
*
(
DWORD
*
)(
context
->
Ebp
-
8
);
context
->
Edi
=
*
(
DWORD
*
)(
context
->
Ebp
-
12
);
/* Clean up stack frame */
context
->
Esp
=
context
->
Ebp
;
context
->
Ebp
=
stack32_pop
(
context
);
/* Pop return address to CALLER of thunk code */
context
->
Eip
=
stack32_pop
(
context
);
}
#ifdef DEFINE_REGS_ENTRYPOINT
#define FT_EXIT_RESTORE_REGS \
"movl %ebx,%eax\n\t" \
"movl -4(%ebp),%ebx\n\t" \
"movl -8(%ebp),%esi\n\t" \
"movl -12(%ebp),%edi\n\t" \
"leave\n\t"
#define DEFINE_FT_Exit(n) \
void WINAPI __regs_FT_Exit ## n(CONTEXT86 *context) \
{ \
FT_Exit(context); \
context->Esp += n; \
} \
DEFINE_REGS_ENTRYPOINT( FT_Exit ## n, 0, 0 )
__ASM_GLOBAL_FUNC( FT_Exit ## n, FT_EXIT_RESTORE_REGS "ret $" #n );
DEFINE_FT_Exit
(
0
);
DEFINE_FT_Exit
(
4
);
...
...
@@ -695,7 +679,7 @@ DEFINE_FT_Exit(48);
DEFINE_FT_Exit
(
52
);
DEFINE_FT_Exit
(
56
);
#endif
/*
DEFINE_REGS_ENTRYPOINT
*/
#endif
/*
__i386__
*/
/***********************************************************************
...
...
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