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
62fa748f
Commit
62fa748f
authored
May 15, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Define fastcall assembly wrappers globally.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9a6dc66a
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
51 deletions
+25
-51
hal.c
dlls/hal/hal.c
+0
-19
rtl.c
dlls/ntdll/rtl.c
+0
-12
ntoskrnl_private.h
dlls/ntoskrnl.exe/ntoskrnl_private.h
+0
-20
asm.h
include/wine/asm.h
+25
-0
No files found.
dlls/hal/hal.c
View file @
62fa748f
...
@@ -36,25 +36,6 @@
...
@@ -36,25 +36,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ntoskrnl
);
WINE_DEFAULT_DEBUG_CHANNEL
(
ntoskrnl
);
#ifdef __i386__
#ifdef __i386__
#define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL1_WRAPPER(func)
/* nothing */
#define DEFINE_FASTCALL_WRAPPER(func,args)
/* nothing */
#endif
#ifdef __i386__
extern
void
*
WINAPI
call_fastcall_func1
(
void
*
func
,
const
void
*
a
);
extern
void
*
WINAPI
call_fastcall_func1
(
void
*
func
,
const
void
*
a
);
__ASM_STDCALL_FUNC
(
call_fastcall_func1
,
8
,
__ASM_STDCALL_FUNC
(
call_fastcall_func1
,
8
,
...
...
dlls/ntdll/rtl.c
View file @
62fa748f
...
@@ -50,18 +50,6 @@
...
@@ -50,18 +50,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
ntdll
);
WINE_DEFAULT_DEBUG_CHANNEL
(
ntdll
);
#ifdef __i386__
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL_WRAPPER(func,args)
/* nothing */
#endif
/* CRC polynomial 0xedb88320 */
/* CRC polynomial 0xedb88320 */
static
const
DWORD
CRC_table
[
256
]
=
static
const
DWORD
CRC_table
[
256
]
=
{
{
...
...
dlls/ntoskrnl.exe/ntoskrnl_private.h
View file @
62fa748f
...
@@ -60,24 +60,4 @@ extern POBJECT_TYPE PsProcessType;
...
@@ -60,24 +60,4 @@ extern POBJECT_TYPE PsProcessType;
extern
POBJECT_TYPE
PsThreadType
;
extern
POBJECT_TYPE
PsThreadType
;
extern
POBJECT_TYPE
SeTokenObjectType
;
extern
POBJECT_TYPE
SeTokenObjectType
;
#ifdef __i386__
#define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
#define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
#define DEFINE_FASTCALL1_WRAPPER(func)
/* nothing */
#define DEFINE_FASTCALL_WRAPPER(func,args)
/* nothing */
#endif
#endif
#endif
include/wine/asm.h
View file @
62fa748f
...
@@ -63,4 +63,29 @@
...
@@ -63,4 +63,29 @@
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name) __ASM_STDCALL(args),code)
#define __ASM_STDCALL_FUNC(name,args,code) __ASM_DEFINE_FUNC(__ASM_NAME(#name) __ASM_STDCALL(args),code)
/* fastcall support */
#ifdef __i386__
# define DEFINE_FASTCALL1_WRAPPER(func) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, 4, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(4) )
# define DEFINE_FASTCALL_WRAPPER(func,args) \
__ASM_STDCALL_FUNC( __fastcall_ ## func, args, \
"popl %eax\n\t" \
"pushl %edx\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else
/* __i386__ */
# define DEFINE_FASTCALL1_WRAPPER(func)
/* nothing */
# define DEFINE_FASTCALL_WRAPPER(func,args)
/* nothing */
#endif
/* __i386__ */
#endif
/* __WINE_WINE_ASM_H */
#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