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
772112cf
Commit
772112cf
authored
Apr 08, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecrt0: Add a trampoline function to align the stack on x86_64 before continuing an exception.
parent
655292ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
exception.c
dlls/winecrt0/exception.c
+8
-0
No files found.
dlls/winecrt0/exception.c
View file @
772112cf
...
@@ -23,6 +23,12 @@
...
@@ -23,6 +23,12 @@
#include "winternl.h"
#include "winternl.h"
#include "wine/exception.h"
#include "wine/exception.h"
#if defined(__x86_64__) && defined(__ASM_GLOBAL_FUNC)
extern
void
__wine_unwind_trampoline
(
void
);
/* we need an extra call to make sure the stack is correctly aligned */
__ASM_GLOBAL_FUNC
(
__wine_unwind_trampoline
,
"callq *%rax"
);
#endif
/* wrapper for RtlUnwind since it clobbers registers on Windows */
/* wrapper for RtlUnwind since it clobbers registers on Windows */
void
__wine_rtl_unwind
(
EXCEPTION_REGISTRATION_RECORD
*
frame
,
EXCEPTION_RECORD
*
record
,
void
__wine_rtl_unwind
(
EXCEPTION_REGISTRATION_RECORD
*
frame
,
EXCEPTION_RECORD
*
record
,
void
(
*
target
)(
void
)
)
void
(
*
target
)(
void
)
)
...
@@ -41,6 +47,8 @@ void __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_RECORD *
...
@@ -41,6 +47,8 @@ void __wine_rtl_unwind( EXCEPTION_REGISTRATION_RECORD* frame, EXCEPTION_RECORD *
:
"=a"
(
dummy1
),
"=S"
(
dummy2
),
"=D"
(
dummy3
),
"=c"
(
dummy4
)
:
"=a"
(
dummy1
),
"=S"
(
dummy2
),
"=D"
(
dummy3
),
"=c"
(
dummy4
)
:
"0"
(
RtlUnwind
),
"1"
(
frame
),
"2"
(
target
),
"3"
(
record
)
:
"0"
(
RtlUnwind
),
"1"
(
frame
),
"2"
(
target
),
"3"
(
record
)
:
"edx"
,
"memory"
);
:
"edx"
,
"memory"
);
#elif defined(__x86_64__) && defined(__ASM_GLOBAL_FUNC)
RtlUnwind
(
frame
,
__wine_unwind_trampoline
,
record
,
target
);
#else
#else
RtlUnwind
(
frame
,
target
,
record
,
0
);
RtlUnwind
(
frame
,
target
,
record
,
0
);
#endif
#endif
...
...
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