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
04a74bdb
Commit
04a74bdb
authored
Sep 07, 2023
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add SEH information to relay entry points on ARM64.
parent
425bd55b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
24 deletions
+25
-24
relay.c
dlls/ntdll/relay.c
+4
-4
spec32.c
tools/winebuild/spec32.c
+21
-20
No files found.
dlls/ntdll/relay.c
View file @
04a74bdb
...
...
@@ -646,10 +646,11 @@ DECLSPEC_HIDDEN void WINAPI relay_trace_exit( struct relay_descr *descr, unsigne
extern
LONGLONG
CDECL
call_entry_point
(
void
*
func
,
int
nb_args
,
const
INT_PTR
*
args
);
__ASM_GLOBAL_FUNC
(
call_entry_point
,
"stp x29, x30, [SP,#-16]!
\n\t
"
"stp x19, x20, [SP,#-16]!
\n\t
"
__ASM_SEH
(
".seh_save_fplr_x 16
\n\t
"
)
"mov x29, SP
\n\t
"
"mov x19, x2
\n\t
"
"ldp x8, x9, [x19, #-32]
\n\t
"
__ASM_SEH
(
".seh_set_fp
\n\t
"
)
__ASM_SEH
(
".seh_endprologue
\n\t
"
)
"ldr x8, [x2, #-32]
\n\t
"
"mov x9, x0
\n\t
"
"cbz w1, 2f
\n\t
"
"mov w10, w1
\n\t
"
...
...
@@ -682,7 +683,6 @@ __ASM_GLOBAL_FUNC( call_entry_point,
"cbnz w12, 1b
\n\t
"
"2: blr x9
\n\t
"
"mov SP, x29
\n\t
"
"ldp x19, x20, [SP], #16
\n\t
"
"ldp x29, x30, [SP], #16
\n\t
"
"ret
\n
"
)
...
...
tools/winebuild/spec32.c
View file @
04a74bdb
...
...
@@ -329,28 +329,30 @@ static void output_relay_debug( DLLSPEC *spec )
}
case
CPU_ARM64
:
{
int
stack_size
=
16
*
((
min
(
odp
->
u
.
func
.
nb_args
,
8
)
+
1
)
/
2
);
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
output_cfi
(
".cfi_startproc"
);
switch
(
odp
->
u
.
func
.
nb_args
)
{
default:
case
8
:
case
7
:
output
(
"
\t
stp x6, x7, [SP,#-16]!
\n
"
);
output_cfi
(
".seh_proc __wine_spec_relay_entry_point_%d"
,
i
);
output
(
"
\t
stp x29, x30, [sp, #-%u]!
\n
"
,
stack_size
+
16
);
output_cfi
(
".seh_save_fplr_x %u"
,
stack_size
+
16
);
output
(
"
\t
mov x29, sp
\n
"
);
output_cfi
(
".seh_set_fp"
);
output_cfi
(
".seh_endprologue"
);
switch
(
stack_size
)
{
case
64
:
output
(
"
\t
stp x6, x7, [sp, #64]
\n
"
);
/* fall through */
case
6
:
case
5
:
output
(
"
\t
stp x4, x5, [SP,#-16]!
\n
"
);
case
48
:
output
(
"
\t
stp x4, x5, [sp, #48]
\n
"
);
/* fall through */
case
4
:
case
3
:
output
(
"
\t
stp x2, x3, [SP,#-16]!
\n
"
);
case
32
:
output
(
"
\t
stp x2, x3, [sp, #32]
\n
"
);
/* fall through */
case
2
:
case
1
:
output
(
"
\t
stp x0, x1, [SP,#-16]!
\n
"
);
case
16
:
output
(
"
\t
stp x0, x1, [sp, #16]
\n
"
);
/* fall through */
case
0
:
break
;
default:
break
;
}
output
(
"
\t
mov x2, SP
\n
"
);
output
(
"
\t
stp x29, x30, [SP,#-16]!
\n
"
);
output
(
"
\t
add x2, sp, #16
\n
"
);
output
(
"
\t
stp x8, x9, [SP,#-16]!
\n
"
);
output
(
"
\t
mov w1, #%u
\n
"
,
odp
->
u
.
func
.
args_str_offset
<<
16
);
if
(
i
-
spec
->
base
)
output
(
"
\t
add w1, w1, #%u
\n
"
,
i
-
spec
->
base
);
...
...
@@ -358,13 +360,12 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
add x0, x0, #%s
\n
"
,
arm64_pageoff
(
".L__wine_spec_relay_descr"
)
);
output
(
"
\t
ldr x3, [x0, #8]
\n
"
);
output
(
"
\t
blr x3
\n
"
);
output
(
"
\t
add SP, SP, #16
\n
"
);
output
(
"
\t
ldp x29, x30, [SP], #16
\n
"
);
if
(
odp
->
u
.
func
.
nb_args
)
output
(
"
\t
add SP, SP, #%u
\n
"
,
8
*
((
min
(
odp
->
u
.
func
.
nb_args
,
8
)
+
1
)
&
~
1
)
);
output
(
"
\t
mov sp, x29
\n
"
);
output
(
"
\t
ldp x29, x30, [sp], #%u
\n
"
,
stack_size
+
16
);
output
(
"
\t
ret
\n
"
);
output_cfi
(
".
cfi
_endproc"
);
output_cfi
(
".
seh
_endproc"
);
break
;
}
case
CPU_x86_64
:
output
(
"
\t
.align %d
\n
"
,
get_alignment
(
4
)
);
...
...
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