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
065287ed
Commit
065287ed
authored
Jun 25, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libwine: Add call frame annotations in x86 assembly code.
parent
e7da3b51
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
4 deletions
+22
-4
interlocked.c
libs/port/interlocked.c
+8
-0
port.c
libs/wine/port.c
+14
-4
No files found.
libs/port/interlocked.c
View file @
065287ed
...
...
@@ -40,7 +40,11 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg_ptr,
"ret"
)
__ASM_GLOBAL_FUNC
(
interlocked_cmpxchg64
,
"push %ebx
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebx,0
\n\t
"
)
"push %esi
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %esi,0
\n\t
"
)
"movl 12(%esp),%esi
\n\t
"
"movl 16(%esp),%ebx
\n\t
"
"movl 20(%esp),%ecx
\n\t
"
...
...
@@ -48,7 +52,11 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg_ptr,
"movl 28(%esp),%edx
\n\t
"
"lock; cmpxchg8b (%esi)
\n\t
"
"pop %esi
\n\t
"
__ASM_CFI
(
".cfi_same_value %esi
\n\t
"
)
__ASM_CFI
(
".cfi_adjust_cfa_offset -4
\n\t
"
)
"pop %ebx
\n\t
"
__ASM_CFI
(
".cfi_same_value %ebx
\n\t
"
)
__ASM_CFI
(
".cfi_adjust_cfa_offset -4
\n\t
"
)
"ret"
)
__ASM_GLOBAL_FUNC
(
interlocked_xchg
,
"movl 8(%esp),%eax
\n\t
"
...
...
libs/wine/port.c
View file @
065287ed
...
...
@@ -94,19 +94,29 @@ void DECLSPEC_NORETURN wine_switch_to_stack( void (*func)(void *), void *arg, vo
#if defined(__i386__) && defined(__GNUC__)
__ASM_GLOBAL_FUNC
(
wine_call_on_stack
,
"pushl %ebp
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %ebp,0
\n\t
"
)
"pushl %esi
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset 4
\n\t
"
)
__ASM_CFI
(
".cfi_rel_offset %esi,0
\n\t
"
)
"movl %esp,%esi
\n\t
"
__ASM_CFI
(
".cfi_def_cfa_register %esi
\n\t
"
)
"movl 12(%esp),%ecx
\n\t
"
/* func */
"movl 16(%esp),%edx
\n\t
"
/* arg */
"movl 20(%esp),%e
si
\n\t
"
/* stack */
"andl $~15,%e
si
\n\t
"
"subl $12,%e
si
\n\t
"
"
xchgl %esi
,%esp
\n\t
"
"movl 20(%esp),%e
ax
\n\t
"
/* stack */
"andl $~15,%e
ax
\n\t
"
"subl $12,%e
ax
\n\t
"
"
movl %eax
,%esp
\n\t
"
"pushl %edx
\n\t
"
"xorl %ebp,%ebp
\n\t
"
"call *%ecx
\n\t
"
"movl %esi,%esp
\n\t
"
"popl %esi
\n\t
"
__ASM_CFI
(
".cfi_adjust_cfa_offset -4
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %esi
\n\t
"
)
"popl %ebp
\n\t
"
__ASM_CFI
(
".cfi_def_cfa %esp,4
\n\t
"
)
__ASM_CFI
(
".cfi_same_value %ebp
\n\t
"
)
"ret"
)
#elif defined(__i386__) && defined(_MSC_VER)
__declspec
(
naked
)
int
wine_call_on_stack
(
int
(
*
func
)(
void
*
),
void
*
arg
,
void
*
stack
)
...
...
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