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
99eac46f
Commit
99eac46f
authored
Aug 28, 2001
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Output correct assembly function headers for all functions.
parent
8eebd2c9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
25 deletions
+27
-25
relay.c
tools/winebuild/relay.c
+27
-25
No files found.
tools/winebuild/relay.c
View file @
99eac46f
...
...
@@ -20,6 +20,22 @@
#ifdef __i386__
static
void
function_header
(
FILE
*
outfile
,
const
char
*
name
)
{
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
#ifdef USE_STABS
fprintf
(
outfile
,
"
\t
.stabs
\"
%s:F1
\"
,36,0,0,"
PREFIX
"%s
\n
"
,
name
,
name
);
#endif
#ifdef NEED_TYPE_IN_DEF
fprintf
(
outfile
,
"
\t
.def "
PREFIX
"%s; .scl 2; .type 32; .endef
\n
"
,
name
);
#else
fprintf
(
outfile
,
"
\t
.type "
PREFIX
"%s,@function
\n
"
,
name
);
#endif
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"%s
\n
"
,
name
);
fprintf
(
outfile
,
PREFIX
"%s:
\n
"
,
name
);
}
/*******************************************************************
* BuildCallFrom16Core
*
...
...
@@ -92,13 +108,10 @@ static void BuildCallFrom16Core( FILE *outfile, int reg_func, int thunk, int sho
char
*
name
=
thunk
?
"thunk"
:
reg_func
?
"regs"
:
short_ret
?
"word"
:
"long"
;
/* Function header */
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
#ifdef USE_STABS
fprintf
(
outfile
,
".stabs
\"
__wine_call_from_16_%s:F1
\"
,36,0,0,"
PREFIX
"__wine_call_from_16_%s
\n
"
,
name
,
name
);
#endif
fprintf
(
outfile
,
"
\t
"
__ASM_FUNC
(
"__wine_call_from_16_%s"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"__wine_call_from_16_%s
\n
"
,
name
);
fprintf
(
outfile
,
PREFIX
"__wine_call_from_16_%s:
\n
"
,
name
);
if
(
thunk
)
function_header
(
outfile
,
"__wine_call_from_16_thunk"
);
else
if
(
reg_func
)
function_header
(
outfile
,
"__wine_call_from_16_regs"
);
else
if
(
short_ret
)
function_header
(
outfile
,
"__wine_call_from_16_word"
);
else
function_header
(
outfile
,
"__wine_call_from_16_long"
);
/* Create STACK16FRAME (except STACK32FRAME link) */
fprintf
(
outfile
,
"
\t
pushw %%gs
\n
"
);
...
...
@@ -448,14 +461,10 @@ static void BuildCallTo16Core( FILE *outfile, int short_ret, int reg_func )
short_ret
?
"word"
:
"long"
;
/* Function header */
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
#ifdef USE_STABS
fprintf
(
outfile
,
".stabs
\"
wine_call_to_16_%s:F1
\"
,36,0,0,"
PREFIX
"wine_call_to_16_%s
\n
"
,
name
,
name
);
#endif
fprintf
(
outfile
,
"
\t
"
__ASM_FUNC
(
"wine_call_to_16_%s"
)
"
\n
"
,
name
);
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"wine_call_to_16_%s
\n
"
,
name
);
fprintf
(
outfile
,
PREFIX
"wine_call_to_16_%s:
\n
"
,
name
);
if
(
reg_func
==
2
)
function_header
(
outfile
,
"wine_call_to_16_regs_long"
);
else
if
(
reg_func
==
1
)
function_header
(
outfile
,
"wine_call_to_16_regs_short"
);
else
if
(
short_ret
)
function_header
(
outfile
,
"wine_call_to_16_word"
);
else
function_header
(
outfile
,
"wine_call_to_16_long"
);
/* Function entry sequence */
fprintf
(
outfile
,
"
\t
pushl %%ebp
\n
"
);
...
...
@@ -689,9 +698,7 @@ static void BuildRet16Func( FILE *outfile )
* run-time relocation of the SYSLEVEL_Win16CurrentTeb symbol
*/
fprintf
(
outfile
,
"
\n\t
"
__ASM_FUNC
(
"CallTo16_Ret"
)
"
\n
"
);
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"CallTo16_Ret
\n
"
);
fprintf
(
outfile
,
PREFIX
"CallTo16_Ret:
\n
"
);
function_header
(
outfile
,
"CallTo16_Ret"
);
/* Save %esp into %esi */
fprintf
(
outfile
,
"
\t
movl %%esp,%%esi
\n
"
);
...
...
@@ -1019,19 +1026,14 @@ static void BuildCallFrom32Regs( FILE *outfile )
/* Function header */
fprintf
(
outfile
,
"
\n\t
.align %d
\n
"
,
get_alignment
(
4
)
);
#ifdef USE_STABS
fprintf
(
outfile
,
".stabs
\"
CALL32_Regs:F1
\"
,36,0,0,"
PREFIX
"CALL32_Regs
\n
"
);
#endif
fprintf
(
outfile
,
"
\t
.globl "
PREFIX
"CALL32_Regs
\n
"
);
fprintf
(
outfile
,
PREFIX
"CALL32_Regs:
\n
"
);
function_header
(
outfile
,
"CALL32_Regs"
);
/* Allocate some buffer space on the stack */
fprintf
(
outfile
,
"
\t
pushl %%ebp
\n
"
);
fprintf
(
outfile
,
"
\t
movl %%esp,%%ebp
\n
"
);
fprintf
(
outfile
,
"
\t
leal -%d(%%esp), %%esp
\n
"
,
STACK_SPACE
);
/* Build the context structure */
fprintf
(
outfile
,
"
\t
movl %%eax,%d(%%ebp)
\n
"
,
CONTEXTOFFSET
(
Eax
)
-
STACK_SPACE
);
...
...
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