Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d2452b57
Commit
d2452b57
authored
Nov 24, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include: Add asm helper macros to define import variables.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
79d8ed48
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
6 deletions
+24
-6
iob.c
dlls/msvcrt/iob.c
+2
-6
asm.h
include/wine/asm.h
+22
-0
No files found.
dlls/msvcrt/iob.c
View file @
d2452b57
...
...
@@ -24,6 +24,7 @@
#endif
#include <stdio.h>
#include <wine/asm.h>
#undef __iob_func
extern
FILE
*
__cdecl
__iob_func
(
void
);
...
...
@@ -35,9 +36,4 @@ FILE * __cdecl __acrt_iob_func(unsigned idx)
{
return
__iob_func
()
+
idx
;
}
#ifdef __i386__
void
*
_imp____acrt_iob_func
=
__acrt_iob_func
;
#else
void
*
__imp___acrt_iob_func
=
__acrt_iob_func
;
#endif
__ASM_GLOBAL_IMPORT
(
__acrt_iob_func
)
include/wine/asm.h
View file @
d2452b57
...
...
@@ -83,6 +83,28 @@
#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)
/* import variables */
#ifdef _WIN64
#define __ASM_DEFINE_IMPORT(name) \
__ASM_BLOCK_BEGIN(__LINE__) \
asm(".data\n\t.balign 8\n\t.globl __imp_" name "\n__imp_" name ":\n\t.quad " name "\n\t.text"); \
__ASM_BLOCK_END
#else
#define __ASM_DEFINE_IMPORT(name) \
__ASM_BLOCK_BEGIN(__LINE__) \
asm(".data\n\t.balign 4\n\t.globl __imp_" name "\n__imp_" name ":\n\t.long " name "\n\t.text"); \
__ASM_BLOCK_END
#endif
#ifdef _WIN32
#define __ASM_GLOBAL_IMPORT(name) __ASM_DEFINE_IMPORT(__ASM_NAME(#name))
#define __ASM_STDCALL_IMPORT(name,args) __ASM_DEFINE_IMPORT(__ASM_STDCALL(#name,args))
#else
#define __ASM_GLOBAL_IMPORT(name)
/* nothing */
#define __ASM_STDCALL_IMPORT(name,args)
/* nothing */
#endif
/* fastcall support */
#if defined(__i386__) && !defined(_WIN32)
...
...
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