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
d896b119
Commit
d896b119
authored
Nov 23, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Implement BaseThreadInitThunk in assembly also for PE builds.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=50171
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b17d4d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
thread.c
dlls/kernel32/thread.c
+6
-7
asm.h
include/wine/asm.h
+7
-5
No files found.
dlls/kernel32/thread.c
View file @
d896b119
...
...
@@ -33,8 +33,11 @@
#include "kernel_private.h"
/***********************************************************************
* BaseThreadInitThunk (KERNEL32.@)
*/
#ifdef __i386__
__ASM_
STDCALL_FUNC
(
__fastcall_
BaseThreadInitThunk
,
12
,
__ASM_
FASTCALL_FUNC
(
BaseThreadInitThunk
,
12
,
"pushl %ebp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebp,0
\n\t
"
)
...
...
@@ -50,16 +53,12 @@ __ASM_STDCALL_FUNC( __fastcall_BaseThreadInitThunk, 12,
"call *%edx
\n\t
"
"movl %eax,(%esp)
\n\t
"
"call "
__ASM_STDCALL
(
"RtlExitUserThread"
,
4
))
#endif
/***********************************************************************
* BaseThreadInitThunk (KERNEL32.@)
*/
#else
void
__fastcall
BaseThreadInitThunk
(
DWORD
unknown
,
LPTHREAD_START_ROUTINE
entry
,
void
*
arg
)
{
RtlExitUserThread
(
entry
(
arg
)
);
}
#endif
/***********************************************************************
* FreeLibraryAndExitThread (KERNEL32.@)
...
...
include/wine/asm.h
View file @
d896b119
...
...
@@ -28,9 +28,11 @@
#endif
#if defined(_WIN32) && defined(__i386__)
# define __ASM_STDCALL(name,args) __ASM_NAME(name) "@" #args
# define __ASM_STDCALL(name,args) "_" name "@" #args
# define __ASM_FASTCALL(name,args) "@" name "@" #args
#else
# define __ASM_STDCALL(name,args) __ASM_NAME(name)
# define __ASM_STDCALL(name,args) __ASM_NAME(name)
# define __ASM_FASTCALL(name,args) __ASM_NAME("__fastcall_" name)
#endif
#if defined(__GCC_HAVE_DWARF2_CFI_ASM) || (defined(__clang__) && defined(__GNUC__) && !defined(__SEH__))
...
...
@@ -78,21 +80,21 @@
__ASM_BLOCK_END
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name),code)
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_STDCALL(#name,args),code)
#define __ASM_FASTCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_FASTCALL(#name,args),code)
/* fastcall support */
#if defined(__i386__) && !defined(_WIN32)
# define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_
STDCALL_FUNC( __fastcall_ ##
func, 4, \
__ASM_
FASTCALL_FUNC(
func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_STDCALL(#func,4) )
# define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_
STDCALL_FUNC( __fastcall_ ##
func, args, \
__ASM_
FASTCALL_FUNC(
func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
...
...
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