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
e25b1ab7
Commit
e25b1ab7
authored
Feb 05, 2024
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Remove some no longer used code for ARM platforms.
parent
bbce5d01
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
120 deletions
+15
-120
import.c
tools/winebuild/import.c
+10
-86
spec32.c
tools/winebuild/spec32.c
+4
-15
utils.c
tools/winebuild/utils.c
+1
-19
No files found.
tools/winebuild/import.c
View file @
e25b1ab7
...
...
@@ -778,19 +778,9 @@ static void output_import_thunk( const char *name, const char *table, int pos )
output
(
"
\t
jmpq *%s+%d(%%rip)
\n
"
,
table
,
pos
);
break
;
case
CPU_ARM
:
if
(
UsePIC
)
{
output
(
"
\t
ldr ip, 2f
\n
"
);
output
(
"1:
\t
add ip, pc
\n
"
);
output
(
"
\t
ldr pc, [ip]
\n
"
);
output
(
"2:
\t
.long %s+%u-1b-%u
\n
"
,
table
,
pos
,
thumb_mode
?
4
:
8
);
}
else
{
output
(
"
\t
ldr ip, 1f
\n
"
);
output
(
"
\t
ldr pc, [ip]
\n
"
);
output
(
"1:
\t
.long %s+%u
\n
"
,
table
,
pos
);
}
output
(
"
\t
ldr ip, 1f
\n
"
);
output
(
"
\t
ldr pc, [ip]
\n
"
);
output
(
"1:
\t
.long %s+%u
\n
"
,
table
,
pos
);
break
;
case
CPU_ARM64
:
output
(
"
\t
adrp x16, %s
\n
"
,
arm64_page
(
table
)
);
...
...
@@ -1088,39 +1078,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output
(
"
\t
jmp *%%rax
\n
"
);
break
;
case
CPU_ARM
:
output
(
"
\t
push {r0-r3,FP,LR}
\n
"
);
output
(
"
\t
mov r1,IP
\n
"
);
output
(
"
\t
ldr r0, 1f
\n
"
);
if
(
UsePIC
)
output
(
"2:
\t
add r0, pc
\n
"
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__delayLoadHelper2"
)
);
output
(
"
\t
mov IP,r0
\n
"
);
output
(
"
\t
pop {r0-r3,FP,LR}
\n
"
);
output
(
"
\t
bx IP
\n
"
);
if
(
UsePIC
)
output
(
"1:
\t
.long .L__wine_spec_delay_imports+%u-2b-%u
\n
"
,
pos
,
thumb_mode
?
4
:
8
);
else
output
(
"1:
\t
.long .L__wine_spec_delay_imports+%u
\n
"
,
pos
);
break
;
case
CPU_ARM64
:
output
(
"
\t
stp x29, x30, [sp,#-80]!
\n
"
);
output
(
"
\t
mov x29, sp
\n
"
);
output
(
"
\t
stp x0, x1, [sp,#16]
\n
"
);
output
(
"
\t
stp x2, x3, [sp,#32]
\n
"
);
output
(
"
\t
stp x4, x5, [sp,#48]
\n
"
);
output
(
"
\t
stp x6, x7, [sp,#64]
\n
"
);
output
(
"
\t
mov x1, x16
\n
"
);
output
(
"
\t
adrp x0, %s
\n
"
,
arm64_page
(
".L__wine_spec_delay_imports"
)
);
output
(
"
\t
add x0, x0, #%s
\n
"
,
arm64_pageoff
(
".L__wine_spec_delay_imports"
)
);
if
(
pos
)
output
(
"
\t
add x0, x0, #%u
\n
"
,
pos
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__delayLoadHelper2"
)
);
output
(
"
\t
mov x16, x0
\n
"
);
output
(
"
\t
ldp x0, x1, [sp,#16]
\n
"
);
output
(
"
\t
ldp x2, x3, [sp,#32]
\n
"
);
output
(
"
\t
ldp x4, x5, [sp,#48]
\n
"
);
output
(
"
\t
ldp x6, x7, [sp,#64]
\n
"
);
output
(
"
\t
ldp x29, x30, [sp],#80
\n
"
);
output
(
"
\t
br x16
\n
"
);
break
;
case
CPU_ARM64EC
:
assert
(
0
);
break
;
...
...
@@ -1134,7 +1092,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
struct
import_func
*
func
=
&
import
->
imports
[
j
];
const
char
*
name
=
func
->
name
?
func
->
name
:
func
->
export_name
;
if
(
thumb_mode
)
output
(
"
\t
.thumb_func
\n
"
);
output
(
"__wine_delay_imp_%s_%s:
\n
"
,
import
->
c_name
,
name
);
switch
(
target
.
cpu
)
{
...
...
@@ -1153,26 +1110,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output
(
"
\t
jmp %s
\n
"
,
asm_name
(
module_func
)
);
break
;
case
CPU_ARM
:
if
(
UsePIC
)
{
output
(
"
\t
ldr ip, 2f
\n
"
);
output
(
"1:
\t
add ip, pc
\n
"
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
module_func
)
);
output
(
"2:
\t
.long .L__wine_delay_IAT+%u-1b-%u
\n
"
,
iat_pos
,
thumb_mode
?
4
:
8
);
}
else
{
output
(
"
\t
ldr ip, 1f
\n
"
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
module_func
)
);
output
(
"1:
\t
.long .L__wine_delay_IAT+%u
\n
"
,
iat_pos
);
}
break
;
case
CPU_ARM64
:
output
(
"
\t
adrp x16, %s
\n
"
,
arm64_page
(
".L__wine_delay_IAT"
)
);
output
(
"
\t
add x16, x16, #%s
\n
"
,
arm64_pageoff
(
".L__wine_delay_IAT"
)
);
if
(
iat_pos
)
output
(
"
\t
add x16, x16, #%u
\n
"
,
iat_pos
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
module_func
)
);
break
;
case
CPU_ARM64EC
:
assert
(
0
);
break
;
...
...
@@ -1318,29 +1256,15 @@ void output_stubs( DLLSPEC *spec )
output_seh
(
".seh_endproc"
);
break
;
case
CPU_ARM
:
if
(
UsePIC
)
{
output
(
"
\t
ldr r0,3f
\n
"
);
output
(
"1:
\t
add r0,PC
\n
"
);
output
(
"
\t
ldr r1,3f+4
\n
"
);
if
(
exp_name
)
output
(
"2:
\t
add r1,PC
\n
"
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_spec_unimplemented_stub"
)
);
output
(
"3:
\t
.long .L__wine_spec_file_name-1b-%u
\n
"
,
thumb_mode
?
4
:
8
);
if
(
exp_name
)
output
(
"
\t
.long .L%s_string-2b-%u
\n
"
,
name
,
thumb_mode
?
4
:
8
);
else
output
(
"
\t
.long %u
\n
"
,
odp
->
ordinal
);
}
else
output
(
"
\t
movw r0,:lower16:.L__wine_spec_file_name
\n
"
);
output
(
"
\t
movt r0,:upper16:.L__wine_spec_file_name
\n
"
);
if
(
exp_name
)
{
output
(
"
\t
movw r0,:lower16:.L__wine_spec_file_name
\n
"
);
output
(
"
\t
movt r0,:upper16:.L__wine_spec_file_name
\n
"
);
if
(
exp_name
)
{
output
(
"
\t
movw r1,:lower16:.L%s_string
\n
"
,
name
);
output
(
"
\t
movt r1,:upper16:.L%s_string
\n
"
,
name
);
}
else
output
(
"
\t
mov r1,#%u
\n
"
,
odp
->
ordinal
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_spec_unimplemented_stub"
)
);
output
(
"
\t
movw r1,:lower16:.L%s_string
\n
"
,
name
);
output
(
"
\t
movt r1,:upper16:.L%s_string
\n
"
,
name
);
}
else
output
(
"
\t
mov r1,#%u
\n
"
,
odp
->
ordinal
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_spec_unimplemented_stub"
)
);
break
;
case
CPU_ARM64
:
case
CPU_ARM64EC
:
...
...
tools/winebuild/spec32.c
View file @
e25b1ab7
...
...
@@ -245,7 +245,6 @@ static void output_relay_debug( DLLSPEC *spec )
/* then the relay thunks */
output
(
"
\t
.text
\n
"
);
if
(
thumb_mode
)
output
(
"
\t
.thumb_func
\n
"
);
output
(
"__wine_spec_relay_entry_points:
\n
"
);
output
(
"
\t
nop
\n
"
);
/* to avoid 0 offset */
...
...
@@ -296,9 +295,8 @@ static void output_relay_debug( DLLSPEC *spec )
{
int
j
,
has_float
=
0
;
if
(
strcmp
(
float_abi_option
,
"soft"
))
for
(
j
=
0
;
j
<
odp
->
u
.
func
.
nb_args
&&
!
has_float
;
j
++
)
has_float
=
is_float_arg
(
odp
,
j
);
for
(
j
=
0
;
j
<
odp
->
u
.
func
.
nb_args
&&
!
has_float
;
j
++
)
has_float
=
is_float_arg
(
odp
,
j
);
output
(
"
\t
.balign 4
\n
"
);
output
(
"__wine_spec_relay_entry_point_%d:
\n
"
,
i
);
...
...
@@ -309,22 +307,13 @@ static void output_relay_debug( DLLSPEC *spec )
output
(
"
\t
sub SP, #4
\n
"
);
output
(
"
\t
movw r1,#%u
\n
"
,
i
-
spec
->
base
);
output
(
"
\t
movt r1,#%u
\n
"
,
odp
->
u
.
func
.
args_str_offset
);
if
(
UsePIC
)
{
output
(
"
\t
ldr r0, 2f
\n
"
);
output
(
"1:
\t
add r0, PC
\n
"
);
}
else
{
output
(
"
\t
movw r0, :lower16:.L__wine_spec_relay_descr
\n
"
);
output
(
"
\t
movt r0, :upper16:.L__wine_spec_relay_descr
\n
"
);
}
output
(
"
\t
movw r0, :lower16:.L__wine_spec_relay_descr
\n
"
);
output
(
"
\t
movt r0, :upper16:.L__wine_spec_relay_descr
\n
"
);
output
(
"
\t
ldr IP, [r0, #4]
\n
"
);
output
(
"
\t
blx IP
\n
"
);
output
(
"
\t
ldr IP, [SP, #4]
\n
"
);
output
(
"
\t
add SP, #%u
\n
"
,
24
+
(
has_float
?
64
:
0
)
);
output
(
"
\t
bx IP
\n
"
);
if
(
UsePIC
)
output
(
"2:
\t
.long .L__wine_spec_relay_descr-1b-%u
\n
"
,
thumb_mode
?
4
:
8
);
break
;
}
...
...
tools/winebuild/utils.c
View file @
e25b1ab7
...
...
@@ -466,11 +466,6 @@ void output_standard_file_header(void)
output
(
"
\t
.globl @feat.00
\n
"
);
output
(
".set @feat.00, 1
\n
"
);
}
if
(
thumb_mode
)
{
output
(
"
\t
.syntax unified
\n
"
);
output
(
"
\t
.thumb
\n
"
);
}
}
/* dump a byte stream into the assembly code */
...
...
@@ -849,22 +844,9 @@ void output_function_header( const char *func, int global )
if
(
target
.
cpu
==
CPU_ARM64EC
)
output
(
".section .text,
\"
xr
\"
,discard,%s
\n\t
"
,
name
);
output
(
"
\t
.def %s
\n\t
.scl 2
\n\t
.type 32
\n\t
.endef
\n
"
,
name
);
if
(
global
)
output
(
"
\t
.globl %s
\n
"
,
name
);
if
(
thumb_mode
)
output
(
"
\t
.thumb_func
\n
"
);
break
;
default:
switch
(
target
.
cpu
)
{
case
CPU_ARM
:
output
(
"
\t
.type %s,%%function
\n
"
,
name
);
if
(
thumb_mode
)
output
(
"
\t
.thumb_func
\n
"
);
break
;
case
CPU_ARM64
:
output
(
"
\t
.type %s,%%function
\n
"
,
name
);
break
;
default:
output
(
"
\t
.type %s,@function
\n
"
,
name
);
break
;
}
output
(
"
\t
.type %s,@function
\n
"
,
name
);
if
(
global
)
output
(
"
\t
.globl %s
\n\t
.hidden %s
\n
"
,
name
,
name
);
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