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
7c7544ab
Commit
7c7544ab
authored
Feb 05, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add .seh annotations on ARM.
parent
e25b1ab7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
18 deletions
+32
-18
import.c
tools/winebuild/import.c
+16
-9
spec32.c
tools/winebuild/spec32.c
+16
-9
No files found.
tools/winebuild/import.c
View file @
7c7544ab
...
@@ -1256,6 +1256,8 @@ void output_stubs( DLLSPEC *spec )
...
@@ -1256,6 +1256,8 @@ void output_stubs( DLLSPEC *spec )
output_seh
(
".seh_endproc"
);
output_seh
(
".seh_endproc"
);
break
;
break
;
case
CPU_ARM
:
case
CPU_ARM
:
output
(
"
\t
.seh_proc %s
\n
"
,
asm_name
(
name
)
);
output
(
"
\t
.seh_endprologue
\n
"
);
output
(
"
\t
movw r0,:lower16:.L__wine_spec_file_name
\n
"
);
output
(
"
\t
movw r0,:lower16:.L__wine_spec_file_name
\n
"
);
output
(
"
\t
movt r0,:upper16:.L__wine_spec_file_name
\n
"
);
output
(
"
\t
movt r0,:upper16:.L__wine_spec_file_name
\n
"
);
if
(
exp_name
)
if
(
exp_name
)
...
@@ -1264,12 +1266,13 @@ void output_stubs( DLLSPEC *spec )
...
@@ -1264,12 +1266,13 @@ void output_stubs( DLLSPEC *spec )
output
(
"
\t
movt r1,:upper16:.L%s_string
\n
"
,
name
);
output
(
"
\t
movt r1,:upper16:.L%s_string
\n
"
,
name
);
}
}
else
output
(
"
\t
mov r1,#%u
\n
"
,
odp
->
ordinal
);
else
output
(
"
\t
mov r1,#%u
\n
"
,
odp
->
ordinal
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_spec_unimplemented_stub"
)
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
"__wine_spec_unimplemented_stub"
)
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
case
CPU_ARM64
:
case
CPU_ARM64
:
case
CPU_ARM64EC
:
case
CPU_ARM64EC
:
output
_seh
(
".seh_proc %s
"
,
arm64_name
(
name
)
);
output
(
"
\t
.seh_proc %s
\n
"
,
arm64_name
(
name
)
);
output
_seh
(
".seh_endprologue
"
);
output
(
"
\t
.seh_endprologue
\n
"
);
output
(
"
\t
adrp x0, %s
\n
"
,
arm64_page
(
".L__wine_spec_file_name"
)
);
output
(
"
\t
adrp x0, %s
\n
"
,
arm64_page
(
".L__wine_spec_file_name"
)
);
output
(
"
\t
add x0, x0, #%s
\n
"
,
arm64_pageoff
(
".L__wine_spec_file_name"
)
);
output
(
"
\t
add x0, x0, #%s
\n
"
,
arm64_pageoff
(
".L__wine_spec_file_name"
)
);
if
(
exp_name
)
if
(
exp_name
)
...
@@ -1282,7 +1285,7 @@ void output_stubs( DLLSPEC *spec )
...
@@ -1282,7 +1285,7 @@ void output_stubs( DLLSPEC *spec )
else
else
output
(
"
\t
mov x1, %u
\n
"
,
odp
->
ordinal
);
output
(
"
\t
mov x1, %u
\n
"
,
odp
->
ordinal
);
output
(
"
\t
b %s
\n
"
,
arm64_name
(
"__wine_spec_unimplemented_stub"
)
);
output
(
"
\t
b %s
\n
"
,
arm64_name
(
"__wine_spec_unimplemented_stub"
)
);
output
_seh
(
".seh_endproc
"
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
}
}
output_function_size
(
name
);
output_function_size
(
name
);
...
@@ -1501,7 +1504,10 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1501,7 +1504,10 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output_seh
(
".seh_endproc"
);
output_seh
(
".seh_endproc"
);
break
;
break
;
case
CPU_ARM
:
case
CPU_ARM
:
output
(
"
\t
.seh_proc %s
\n
"
,
asm_name
(
delay_load
)
);
output
(
"
\t
push {r0-r3, FP, LR}
\n
"
);
output
(
"
\t
push {r0-r3, FP, LR}
\n
"
);
output
(
"
\t
.seh_save_regs {r0-r3,fp,lr}
\n
"
);
output
(
"
\t
.seh_endprologue
\n
"
);
output
(
"
\t
mov r1, IP
\n
"
);
output
(
"
\t
mov r1, IP
\n
"
);
output
(
"
\t
ldr r0, 1f
\n
"
);
output
(
"
\t
ldr r0, 1f
\n
"
);
output
(
"
\t
ldr r0, [r0]
\n
"
);
output
(
"
\t
ldr r0, [r0]
\n
"
);
...
@@ -1510,14 +1516,15 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1510,14 +1516,15 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
pop {r0-r3, FP, LR}
\n
"
);
output
(
"
\t
pop {r0-r3, FP, LR}
\n
"
);
output
(
"
\t
bx IP
\n
"
);
output
(
"
\t
bx IP
\n
"
);
output
(
"1:
\t
.long %s
\n
"
,
asm_name
(
import_desc
)
);
output
(
"1:
\t
.long %s
\n
"
,
asm_name
(
import_desc
)
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
case
CPU_ARM64
:
case
CPU_ARM64
:
output
_seh
(
".seh_proc %s
"
,
asm_name
(
delay_load
)
);
output
(
"
\t
.seh_proc %s
\n
"
,
asm_name
(
delay_load
)
);
output
(
"
\t
stp x29, x30, [sp, #-80]!
\n
"
);
output
(
"
\t
stp x29, x30, [sp, #-80]!
\n
"
);
output
_seh
(
".seh_save_fplr_x 80
"
);
output
(
"
\t
.seh_save_fplr_x 80
\n
"
);
output
(
"
\t
mov x29, sp
\n
"
);
output
(
"
\t
mov x29, sp
\n
"
);
output
_seh
(
".seh_set_fp
"
);
output
(
"
\t
.seh_set_fp
\n
"
);
output
_seh
(
".seh_endprologue
"
);
output
(
"
\t
.seh_endprologue
\n
"
);
output
(
"
\t
stp x0, x1, [sp, #16]
\n
"
);
output
(
"
\t
stp x0, x1, [sp, #16]
\n
"
);
output
(
"
\t
stp x2, x3, [sp, #32]
\n
"
);
output
(
"
\t
stp x2, x3, [sp, #32]
\n
"
);
output
(
"
\t
stp x4, x5, [sp, #48]
\n
"
);
output
(
"
\t
stp x4, x5, [sp, #48]
\n
"
);
...
@@ -1533,7 +1540,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
...
@@ -1533,7 +1540,7 @@ static void build_windows_import_lib( const char *lib_name, DLLSPEC *spec, struc
output
(
"
\t
ldp x6, x7, [sp, #64]
\n
"
);
output
(
"
\t
ldp x6, x7, [sp, #64]
\n
"
);
output
(
"
\t
ldp x29, x30, [sp], #80
\n
"
);
output
(
"
\t
ldp x29, x30, [sp], #80
\n
"
);
output
(
"
\t
br x16
\n
"
);
output
(
"
\t
br x16
\n
"
);
output
_seh
(
".seh_endproc
"
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
case
CPU_ARM64EC
:
case
CPU_ARM64EC
:
assert
(
0
);
assert
(
0
);
...
...
tools/winebuild/spec32.c
View file @
7c7544ab
...
@@ -300,11 +300,17 @@ static void output_relay_debug( DLLSPEC *spec )
...
@@ -300,11 +300,17 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
.balign 4
\n
"
);
output
(
"
\t
.balign 4
\n
"
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
output
(
"
\t
.seh_proc __wine_spec_relay_entry_point_%d
\n
"
,
i
);
output
(
"
\t
push {r0-r3}
\n
"
);
output
(
"
\t
push {r0-r3}
\n
"
);
output
(
"
\t
mov r2, SP
\n
"
);
output
(
"
\t
.seh_save_regs {r0-r3}
\n
"
);
if
(
has_float
)
output
(
"
\t
vpush {s0-s15}
\n
"
);
if
(
has_float
)
output
(
"
\t
push {LR}
\n
"
);
{
output
(
"
\t
sub SP, #4
\n
"
);
output
(
"
\t
vpush {d0-d7}
\n
"
);
output
(
"
\t
.seh_save_fregs {d0-d7}
\n
"
);
}
output
(
"
\t
push {r4,lr}
\n
"
);
output
(
"
\t
.seh_save_regs {r4,lr}
\n
"
);
output
(
"
\t
.seh_endprologue
\n
"
);
output
(
"
\t
movw r1,#%u
\n
"
,
i
-
spec
->
base
);
output
(
"
\t
movw r1,#%u
\n
"
,
i
-
spec
->
base
);
output
(
"
\t
movt r1,#%u
\n
"
,
odp
->
u
.
func
.
args_str_offset
);
output
(
"
\t
movt r1,#%u
\n
"
,
odp
->
u
.
func
.
args_str_offset
);
output
(
"
\t
movw r0, :lower16:.L__wine_spec_relay_descr
\n
"
);
output
(
"
\t
movw r0, :lower16:.L__wine_spec_relay_descr
\n
"
);
...
@@ -314,6 +320,7 @@ static void output_relay_debug( DLLSPEC *spec )
...
@@ -314,6 +320,7 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
ldr IP, [SP, #4]
\n
"
);
output
(
"
\t
ldr IP, [SP, #4]
\n
"
);
output
(
"
\t
add SP, #%u
\n
"
,
24
+
(
has_float
?
64
:
0
)
);
output
(
"
\t
add SP, #%u
\n
"
,
24
+
(
has_float
?
64
:
0
)
);
output
(
"
\t
bx IP
\n
"
);
output
(
"
\t
bx IP
\n
"
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
}
}
...
@@ -323,12 +330,12 @@ static void output_relay_debug( DLLSPEC *spec )
...
@@ -323,12 +330,12 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
.balign 4
\n
"
);
output
(
"
\t
.balign 4
\n
"
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
output
_seh
(
".seh_proc __wine_spec_relay_entry_point_%d
"
,
i
);
output
(
"
\t
.seh_proc __wine_spec_relay_entry_point_%d
\n
"
,
i
);
output
(
"
\t
stp x29, x30, [sp, #-%u]!
\n
"
,
stack_size
+
16
);
output
(
"
\t
stp x29, x30, [sp, #-%u]!
\n
"
,
stack_size
+
16
);
output
_seh
(
".seh_save_fplr_x %u
"
,
stack_size
+
16
);
output
(
"
\t
.seh_save_fplr_x %u
\n
"
,
stack_size
+
16
);
output
(
"
\t
mov x29, sp
\n
"
);
output
(
"
\t
mov x29, sp
\n
"
);
output
_seh
(
".seh_set_fp
"
);
output
(
"
\t
.seh_set_fp
\n
"
);
output
_seh
(
".seh_endprologue
"
);
output
(
"
\t
.seh_endprologue
\n
"
);
switch
(
stack_size
)
switch
(
stack_size
)
{
{
case
64
:
output
(
"
\t
stp x6, x7, [sp, #64]
\n
"
);
case
64
:
output
(
"
\t
stp x6, x7, [sp, #64]
\n
"
);
...
@@ -352,7 +359,7 @@ static void output_relay_debug( DLLSPEC *spec )
...
@@ -352,7 +359,7 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
mov sp, x29
\n
"
);
output
(
"
\t
mov sp, x29
\n
"
);
output
(
"
\t
ldp x29, x30, [sp], #%u
\n
"
,
stack_size
+
16
);
output
(
"
\t
ldp x29, x30, [sp], #%u
\n
"
,
stack_size
+
16
);
output
(
"
\t
ret
\n
"
);
output
(
"
\t
ret
\n
"
);
output
_seh
(
".seh_endproc
"
);
output
(
"
\t
.seh_endproc
\n
"
);
break
;
break
;
}
}
...
...
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