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
ee4db200
Commit
ee4db200
authored
May 15, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Define thiscall assembly wrappers globally.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
62fa748f
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
125 deletions
+37
-125
cxx.h
dlls/msvcp90/cxx.h
+0
-23
cxx.h
dlls/msvcrt/cxx.h
+0
-22
txthost.c
dlls/riched20/txthost.c
+0
-29
txtsrv.c
dlls/riched20/txtsrv.c
+0
-29
main.c
dlls/vssapi/main.c
+0
-22
asm.h
include/wine/asm.h
+37
-0
No files found.
dlls/msvcp90/cxx.h
View file @
ee4db200
...
...
@@ -18,29 +18,6 @@
#include "wine/asm.h"
/* Copied from dlls/msvcrt/cxx.h */
#undef __thiscall
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern void THISCALL(func)(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
/* __i386__ */
#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
#ifdef _WIN64
#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n"
...
...
dlls/msvcrt/cxx.h
View file @
ee4db200
...
...
@@ -18,28 +18,6 @@
#include "wine/asm.h"
#undef __thiscall
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern void THISCALL(func)(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
/* __i386__ */
#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
#ifdef _WIN64
#define VTABLE_ADD_FUNC(name) "\t.quad " THISCALL_NAME(name) "\n"
...
...
dlls/riched20/txthost.c
View file @
ee4db200
...
...
@@ -500,35 +500,6 @@ DECLSPEC_HIDDEN HRESULT WINAPI ITextHostImpl_TxGetSelectionBarWidth(ITextHost *i
}
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) (void *) __thiscall_ ## func
#ifdef _MSC_VER
#define DEFINE_THISCALL_WRAPPER(func,args) \
__declspec(naked) HRESULT __thiscall_##func(void) \
{ \
__asm pop eax \
__asm push ecx \
__asm push eax \
__asm jmp func \
}
#else
/* _MSC_VER */
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern HRESULT __thiscall_ ## func(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#endif
/* _MSC_VER */
#else
/* __i386__ */
#define THISCALL(func) func
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
DEFINE_THISCALL_WRAPPER
(
ITextHostImpl_TxGetDC
,
4
)
DEFINE_THISCALL_WRAPPER
(
ITextHostImpl_TxReleaseDC
,
8
)
DEFINE_THISCALL_WRAPPER
(
ITextHostImpl_TxShowScrollBar
,
12
)
...
...
dlls/riched20/txtsrv.c
View file @
ee4db200
...
...
@@ -34,35 +34,6 @@
#include "wine/debug.h"
#include "editstr.h"
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) (void *) __thiscall_ ## func
#ifdef _MSC_VER
#define DEFINE_THISCALL_WRAPPER(func,args) \
__declspec(naked) HRESULT __thiscall_##func(void) \
{ \
__asm pop eax \
__asm push ecx \
__asm push eax \
__asm jmp func \
}
#else
/* _MSC_VER */
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern HRESULT __thiscall_ ## func(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#endif
/* _MSC_VER */
#else
/* __i386__ */
#define THISCALL(func) func
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
WINE_DEFAULT_DEBUG_CHANNEL
(
richedit
);
typedef
struct
ITextServicesImpl
{
...
...
dlls/vssapi/main.c
View file @
ee4db200
...
...
@@ -28,28 +28,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
vssapi
);
#undef __thiscall
#ifdef __i386__
/* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern void THISCALL(func)(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
/* __i386__ */
#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
struct
CVssWriter
{
void
**
vtable
;
...
...
include/wine/asm.h
View file @
ee4db200
...
...
@@ -88,4 +88,41 @@
#endif
/* __i386__ */
/* thiscall support */
#undef __thiscall
#define __thiscall __stdcall
#ifdef __i386__
# ifdef _MSC_VER
# define DEFINE_THISCALL_WRAPPER(func,args) \
__declspec(naked) HRESULT __thiscall_##func(void) \
{ __asm { \
pop eax \
push ecx \
push eax \
jmp func \
} }
# else
/* _MSC_VER */
# define DEFINE_THISCALL_WRAPPER(func,args) \
extern void __thiscall_ ## func(void); \
__ASM_GLOBAL_FUNC( __thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
# endif
/* _MSC_VER */
# define THISCALL(func) (void *)__thiscall_ ## func
# define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#else
/* __i386__ */
# define DEFINE_THISCALL_WRAPPER(func,args)
/* nothing */
# define THISCALL(func) func
# define THISCALL_NAME(func) __ASM_NAME(#func)
#endif
/* __i386__ */
#endif
/* __WINE_WINE_ASM_H */
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