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
5c2db41c
Commit
5c2db41c
authored
Apr 12, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add cfi annotations to the relay functions for i386.
parent
eba56752
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
relay.c
tools/winebuild/relay.c
+34
-1
spec16.c
tools/winebuild/spec16.c
+13
-2
No files found.
tools/winebuild/relay.c
View file @
5c2db41c
...
...
@@ -386,13 +386,20 @@ static void BuildCallTo16Core( int reg_func )
function_header
(
name
);
/* Function entry sequence */
output_cfi
(
".cfi_startproc"
);
output
(
"
\t
pushl %%ebp
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
output_cfi
(
".cfi_rel_offset %%ebp,0"
);
output
(
"
\t
movl %%esp, %%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa_register %%ebp"
);
/* Save the 32-bit registers */
output
(
"
\t
pushl %%ebx
\n
"
);
output_cfi
(
".cfi_rel_offset %%ebx,-4"
);
output
(
"
\t
pushl %%esi
\n
"
);
output_cfi
(
".cfi_rel_offset %%esi,-8"
);
output
(
"
\t
pushl %%edi
\n
"
);
output_cfi
(
".cfi_rel_offset %%edi,-12"
);
output
(
"
\t
.byte 0x64
\n\t
mov %%gs,(%d)
\n
"
,
GS_OFFSET
);
/* Setup exception frame */
...
...
@@ -443,12 +450,18 @@ static void BuildCallTo16Core( int reg_func )
/* Restore the 32-bit registers */
output
(
"
\t
popl %%edi
\n
"
);
output_cfi
(
".cfi_same_value %%edi"
);
output
(
"
\t
popl %%esi
\n
"
);
output_cfi
(
".cfi_same_value %%esi"
);
output
(
"
\t
popl %%ebx
\n
"
);
output_cfi
(
".cfi_same_value %%ebx"
);
/* Function exit sequence */
output
(
"
\t
popl %%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa %%esp,4"
);
output_cfi
(
".cfi_same_value %%ebp"
);
output
(
"
\t
ret $12
\n
"
);
output_cfi
(
".cfi_endproc"
);
/* Start of the actual CallTo16 routine */
...
...
@@ -652,11 +665,18 @@ static void BuildCallTo32CBClient( int isEx )
/* Entry code */
output_cfi
(
".cfi_startproc"
);
output
(
"
\t
pushl %%ebp
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
output_cfi
(
".cfi_rel_offset %%ebp,0"
);
output
(
"
\t
movl %%esp,%%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa_register %%ebp"
);
output
(
"
\t
pushl %%edi
\n
"
);
output_cfi
(
".cfi_rel_offset %%edi,-4"
);
output
(
"
\t
pushl %%esi
\n
"
);
output_cfi
(
".cfi_rel_offset %%esi,-8"
);
output
(
"
\t
pushl %%ebx
\n
"
);
output_cfi
(
".cfi_rel_offset %%ebx,-12"
);
/* Get pointer to temporary area and save the 32-bit stack pointer */
...
...
@@ -694,10 +714,16 @@ static void BuildCallTo32CBClient( int isEx )
/* Restore registers and return */
output
(
"
\t
popl %%ebx
\n
"
);
output_cfi
(
".cfi_same_value %%ebx"
);
output
(
"
\t
popl %%esi
\n
"
);
output_cfi
(
".cfi_same_value %%esi"
);
output
(
"
\t
popl %%edi
\n
"
);
output_cfi
(
".cfi_same_value %%edi"
);
output
(
"
\t
popl %%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa %%esp,4"
);
output_cfi
(
".cfi_same_value %%ebp"
);
output
(
"
\t
ret
\n
"
);
output_cfi
(
".cfi_endproc"
);
output_function_size
(
isEx
?
"CALL32_CBClientEx"
:
"CALL32_CBClient"
);
/* '16-bit' return stub */
...
...
@@ -757,8 +783,12 @@ static void build_call_from_regs_x86(void)
/* Allocate some buffer space on the stack */
output_cfi
(
".cfi_startproc"
);
output
(
"
\t
pushl %%ebp
\n
"
);
output
(
"
\t
movl %%esp,%%ebp
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
output_cfi
(
".cfi_rel_offset %%ebp,0"
);
output
(
"
\t
movl %%esp,%%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa_register %%ebp"
);
output
(
"
\t
leal -%d(%%esp),%%esp
\n
"
,
STACK_SPACE
);
/* Build the context structure */
...
...
@@ -846,11 +876,14 @@ static void build_call_from_regs_x86(void)
output
(
"
\t
popl %%ds
\n
"
);
output
(
"
\t
iret
\n
"
);
output_cfi
(
".cfi_endproc"
);
output_function_size
(
"__wine_call_from_regs"
);
function_header
(
"__wine_restore_regs"
);
output_cfi
(
".cfi_startproc"
);
output
(
"
\t
movl 4(%%esp),%%ecx
\n
"
);
output
(
"
\t
jmp 2b
\n
"
);
output_cfi
(
".cfi_endproc"
);
output_function_size
(
"__wine_restore_regs"
);
}
...
...
tools/winebuild/spec16.c
View file @
5c2db41c
...
...
@@ -312,12 +312,17 @@ static void output_call16_function( ORDDEF *odp )
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
"
\t
%s
\n
"
,
func_declaration
(
name
)
);
output
(
"%s:
\n
"
,
name
);
output_cfi
(
".cfi_startproc"
);
output
(
"
\t
pushl %%ebp
\n
"
);
output_cfi
(
".cfi_adjust_cfa_offset 4"
);
output_cfi
(
".cfi_rel_offset %%ebp,0"
);
output
(
"
\t
movl %%esp,%%ebp
\n
"
);
output_cfi
(
".cfi_def_cfa_register %%ebp"
);
stack_words
=
2
;
if
(
needs_ldt
)
{
output
(
"
\t
pushl %%esi
\n
"
);
output_cfi
(
".cfi_rel_offset %%esi,-4"
);
stack_words
++
;
if
(
UsePIC
)
{
...
...
@@ -390,10 +395,16 @@ static void output_call16_function( ORDDEF *odp )
output
(
"
\t
call *8(%%ebp)
\n
"
);
if
(
needs_ldt
)
output
(
"
\t
movl -4(%%ebp),%%esi
\n
"
);
if
(
needs_ldt
)
{
output
(
"
\t
movl -4(%%ebp),%%esi
\n
"
);
output_cfi
(
".cfi_same_value %%esi"
);
}
output
(
"
\t
leave
\n
"
);
output_cfi
(
".cfi_def_cfa %%esp,4"
);
output_cfi
(
".cfi_same_value %%ebp"
);
output
(
"
\t
ret
\n
"
);
output_cfi
(
".cfi_endproc"
);
output_function_size
(
name
);
}
...
...
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