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
61e210f1
Commit
61e210f1
authored
Nov 17, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Get rid of PowerPC support.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8cd36798
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
5 additions
and
142 deletions
+5
-142
build.h
tools/winebuild/build.h
+1
-1
import.c
tools/winebuild/import.c
+1
-104
main.c
tools/winebuild/main.c
+0
-2
parser.c
tools/winebuild/parser.c
+0
-5
spec32.c
tools/winebuild/spec32.c
+0
-7
utils.c
tools/winebuild/utils.c
+3
-23
No files found.
tools/winebuild/build.h
View file @
61e210f1
...
...
@@ -137,7 +137,7 @@ typedef struct
enum
target_cpu
{
CPU_x86
,
CPU_x86_64
,
CPU_
POWERPC
,
CPU_
ARM
,
CPU_ARM64
,
CPU_LAST
=
CPU_ARM64
CPU_x86
,
CPU_x86_64
,
CPU_ARM
,
CPU_ARM64
,
CPU_LAST
=
CPU_ARM64
};
enum
target_platform
...
...
tools/winebuild/import.c
View file @
61e210f1
...
...
@@ -154,16 +154,6 @@ static struct strarray as_files;
static
const
char
import_func_prefix
[]
=
"__wine$func$"
;
static
const
char
import_ord_prefix
[]
=
"__wine$ord$"
;
static
inline
const
char
*
ppc_reg
(
int
reg
)
{
static
const
char
*
const
ppc_regs
[
32
]
=
{
"r0"
,
"r1"
,
"r2"
,
"r3"
,
"r4"
,
"r5"
,
"r6"
,
"r7"
,
"r8"
,
"r9"
,
"r10"
,
"r11"
,
"r12"
,
"r13"
,
"r14"
,
"r15"
,
"r16"
,
"r17"
,
"r18"
,
"r19"
,
"r20"
,
"r21"
,
"r22"
,
"r23"
,
"r24"
,
"r25"
,
"r26"
,
"r27"
,
"r28"
,
"r29"
,
"r30"
,
"r31"
};
if
(
target_platform
==
PLATFORM_APPLE
)
return
ppc_regs
[
reg
];
return
ppc_regs
[
reg
]
+
1
;
/* skip the 'r' */
}
/* compare function names; helper for resolve_imports */
static
int
name_cmp
(
const
char
**
name
,
const
char
**
entry
)
{
...
...
@@ -826,23 +816,6 @@ static void output_import_thunk( const char *name, const char *table, int pos )
output
(
"
\t
ldr x16, [x16, #%u]
\n
"
,
pos
&
0x7fff
);
output
(
"
\t
br x16
\n
"
);
break
;
case
CPU_POWERPC
:
output
(
"
\t
mr %s, %s
\n
"
,
ppc_reg
(
0
),
ppc_reg
(
31
)
);
if
(
target_platform
==
PLATFORM_APPLE
)
{
output
(
"
\t
lis %s, ha16(%s+%d+32768)
\n
"
,
ppc_reg
(
31
),
table
,
pos
);
output
(
"
\t
la %s, lo16(%s+%d)(%s)
\n
"
,
ppc_reg
(
31
),
table
,
pos
,
ppc_reg
(
31
)
);
}
else
{
output
(
"
\t
lis %s, (%s+%d+32768)@h
\n
"
,
ppc_reg
(
31
),
table
,
pos
);
output
(
"
\t
la %s, (%s+%d)@l(%s)
\n
"
,
ppc_reg
(
31
),
table
,
pos
,
ppc_reg
(
31
)
);
}
output
(
"
\t
lwz %s, 0(%s)
\n
"
,
ppc_reg
(
31
),
ppc_reg
(
31
)
);
output
(
"
\t
mtctr %s
\n
"
,
ppc_reg
(
31
)
);
output
(
"
\t
mr %s, %s
\n
"
,
ppc_reg
(
31
),
ppc_reg
(
0
)
);
output
(
"
\t
bctr
\n
"
);
break
;
}
output_cfi
(
".cfi_endproc"
);
output_function_size
(
name
);
...
...
@@ -1063,7 +1036,7 @@ static void output_delayed_imports( const DLLSPEC *spec )
/* output the delayed import thunks of a Win32 module */
static
void
output_delayed_import_thunks
(
const
DLLSPEC
*
spec
)
{
int
idx
,
j
,
pos
,
extra_stack_storage
=
0
;
int
idx
,
j
,
pos
;
struct
import
*
import
;
static
const
char
delayed_import_loaders
[]
=
"__wine_spec_delayed_import_loaders"
;
static
const
char
delayed_import_thunks
[]
=
"__wine_spec_delayed_import_thunks"
;
...
...
@@ -1148,55 +1121,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output
(
"
\t
ldp x29, x30, [sp],#80
\n
"
);
output
(
"
\t
br x16
\n
"
);
break
;
case
CPU_POWERPC
:
if
(
target_platform
==
PLATFORM_APPLE
)
extra_stack_storage
=
56
;
/* Save all callee saved registers into a stackframe. */
output
(
"
\t
stwu %s, -%d(%s)
\n
"
,
ppc_reg
(
1
),
48
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
3
),
4
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
4
),
8
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
5
),
12
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
6
),
16
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
7
),
20
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
8
),
24
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
9
),
28
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
10
),
32
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
11
),
36
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
12
),
40
+
extra_stack_storage
,
ppc_reg
(
1
));
/* r0 -> r3 (arg1) */
output
(
"
\t
mr %s, %s
\n
"
,
ppc_reg
(
3
),
ppc_reg
(
0
));
/* save return address */
output
(
"
\t
mflr %s
\n
"
,
ppc_reg
(
0
));
output
(
"
\t
stw %s, %d(%s)
\n
"
,
ppc_reg
(
0
),
44
+
extra_stack_storage
,
ppc_reg
(
1
));
/* Call the __wine_delay_load function, arg1 is arg1. */
output
(
"
\t
bl %s
\n
"
,
asm_name
(
"__wine_spec_delay_load"
)
);
/* Load return value from call into ctr register */
output
(
"
\t
mtctr %s
\n
"
,
ppc_reg
(
3
));
/* restore all saved registers and drop stackframe. */
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
3
),
4
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
4
),
8
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
5
),
12
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
6
),
16
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
7
),
20
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
8
),
24
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
9
),
28
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
10
),
32
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
11
),
36
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
12
),
40
+
extra_stack_storage
,
ppc_reg
(
1
));
/* Load return value from call into return register */
output
(
"
\t
lwz %s, %d(%s)
\n
"
,
ppc_reg
(
0
),
44
+
extra_stack_storage
,
ppc_reg
(
1
));
output
(
"
\t
mtlr %s
\n
"
,
ppc_reg
(
0
));
output
(
"
\t
addi %s, %s, %d
\n
"
,
ppc_reg
(
1
),
ppc_reg
(
1
),
48
+
extra_stack_storage
);
/* branch to ctr register. */
output
(
"
\t
bctr
\n
"
);
break
;
}
output_cfi
(
".cfi_endproc"
);
output_function_size
(
"__wine_delay_load_asm"
);
...
...
@@ -1234,33 +1158,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
else
output
(
"
\t
mov x16, #0x%x
\n
"
,
j
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
break
;
case
CPU_POWERPC
:
switch
(
target_platform
)
{
case
PLATFORM_APPLE
:
/* On Darwin we can use r0 and r2 */
/* Upper part in r2 */
output
(
"
\t
lis %s, %d
\n
"
,
ppc_reg
(
2
),
idx
);
/* Lower part + r2 -> r0, Note we can't use r0 directly */
output
(
"
\t
addi %s, %s, %d
\n
"
,
ppc_reg
(
0
),
ppc_reg
(
2
),
j
);
output
(
"
\t
b %s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
break
;
default:
/* On linux we can't use r2 since r2 is not a scratch register (hold the TOC) */
/* Save r13 on the stack */
output
(
"
\t
addi %s, %s, -0x4
\n
"
,
ppc_reg
(
1
),
ppc_reg
(
1
));
output
(
"
\t
stw %s, 0(%s)
\n
"
,
ppc_reg
(
13
),
ppc_reg
(
1
));
/* Upper part in r13 */
output
(
"
\t
lis %s, %d
\n
"
,
ppc_reg
(
13
),
idx
);
/* Lower part + r13 -> r0, Note we can't use r0 directly */
output
(
"
\t
addi %s, %s, %d
\n
"
,
ppc_reg
(
0
),
ppc_reg
(
13
),
j
);
/* Restore r13 */
output
(
"
\t
stw %s, 0(%s)
\n
"
,
ppc_reg
(
13
),
ppc_reg
(
1
));
output
(
"
\t
addic %s, %s, 0x4
\n
"
,
ppc_reg
(
1
),
ppc_reg
(
1
));
output
(
"
\t
b %s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
break
;
}
break
;
}
output_cfi
(
".cfi_endproc"
);
}
...
...
tools/winebuild/main.c
View file @
61e210f1
...
...
@@ -51,8 +51,6 @@ int prefer_native = 0;
enum
target_cpu
target_cpu
=
CPU_x86
;
#elif defined(__x86_64__)
enum
target_cpu
target_cpu
=
CPU_x86_64
;
#elif defined(__powerpc__)
enum
target_cpu
target_cpu
=
CPU_POWERPC
;
#elif defined(__arm__)
enum
target_cpu
target_cpu
=
CPU_ARM
;
#elif defined(__aarch64__)
...
...
tools/winebuild/parser.c
View file @
61e210f1
...
...
@@ -429,11 +429,6 @@ static int parse_spec_stub( ORDDEF *odp, DLLSPEC *spec )
{
odp
->
u
.
func
.
nb_args
=
-
1
;
odp
->
link_name
=
xstrdup
(
""
);
/* don't bother generating stubs for Winelib */
if
(
odp
->
flags
&
FLAG_CPU_MASK
)
odp
->
flags
&=
FLAG_CPU
(
CPU_x86
)
|
FLAG_CPU
(
CPU_x86_64
)
|
FLAG_CPU
(
CPU_ARM
)
|
FLAG_CPU
(
CPU_ARM64
);
else
odp
->
flags
|=
FLAG_CPU
(
CPU_x86
)
|
FLAG_CPU
(
CPU_x86_64
)
|
FLAG_CPU
(
CPU_ARM
)
|
FLAG_CPU
(
CPU_ARM64
);
return
parse_spec_arguments
(
odp
,
spec
,
1
);
}
...
...
tools/winebuild/spec32.c
View file @
61e210f1
...
...
@@ -98,10 +98,6 @@ static int has_relays( DLLSPEC *spec )
{
int
i
;
if
(
target_cpu
!=
CPU_x86
&&
target_cpu
!=
CPU_x86_64
&&
target_cpu
!=
CPU_ARM
&&
target_cpu
!=
CPU_ARM64
)
return
0
;
for
(
i
=
spec
->
base
;
i
<=
spec
->
limit
;
i
++
)
{
ORDDEF
*
odp
=
spec
->
ordinals
[
i
];
...
...
@@ -656,7 +652,6 @@ void output_module( DLLSPEC *spec )
output
(
"
\t
b 1f
\n
"
);
break
;
case
CPU_ARM64
:
case
CPU_POWERPC
:
output
(
"
\n\t
.section
\"
.init
\"
,
\"
ax
\"\n
"
);
output
(
"
\t
b 1f
\n
"
);
break
;
...
...
@@ -680,7 +675,6 @@ void output_module( DLLSPEC *spec )
{
case
CPU_x86
:
machine
=
IMAGE_FILE_MACHINE_I386
;
break
;
case
CPU_x86_64
:
machine
=
IMAGE_FILE_MACHINE_AMD64
;
break
;
case
CPU_POWERPC
:
machine
=
IMAGE_FILE_MACHINE_POWERPC
;
break
;
case
CPU_ARM
:
machine
=
IMAGE_FILE_MACHINE_ARMNT
;
break
;
case
CPU_ARM64
:
machine
=
IMAGE_FILE_MACHINE_ARM64
;
break
;
}
...
...
@@ -974,7 +968,6 @@ void output_fake_module( DLLSPEC *spec )
{
case
CPU_x86
:
put_word
(
IMAGE_FILE_MACHINE_I386
);
break
;
case
CPU_x86_64
:
put_word
(
IMAGE_FILE_MACHINE_AMD64
);
break
;
case
CPU_POWERPC
:
put_word
(
IMAGE_FILE_MACHINE_POWERPC
);
break
;
case
CPU_ARM
:
put_word
(
IMAGE_FILE_MACHINE_ARMNT
);
break
;
case
CPU_ARM64
:
put_word
(
IMAGE_FILE_MACHINE_ARM64
);
break
;
}
...
...
tools/winebuild/utils.c
View file @
61e210f1
...
...
@@ -45,7 +45,6 @@ static const struct
{
"i786"
,
CPU_x86
},
{
"amd64"
,
CPU_x86_64
},
{
"x86_64"
,
CPU_x86_64
},
{
"powerpc"
,
CPU_POWERPC
},
{
"arm"
,
CPU_ARM
},
{
"armv5"
,
CPU_ARM
},
{
"armv6"
,
CPU_ARM
},
...
...
@@ -346,15 +345,7 @@ struct strarray get_as_command(void)
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"x86_64"
:
"i386"
);
break
;
default:
switch
(
target_cpu
)
{
case
CPU_POWERPC
:
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"-a64"
:
"-a32"
);
break
;
default:
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"--64"
:
"--32"
);
break
;
}
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"--64"
:
"--32"
);
break
;
}
}
...
...
@@ -394,17 +385,8 @@ struct strarray get_ld_command(void)
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"i386pep"
:
"i386pe"
);
break
;
default:
switch
(
target_cpu
)
{
case
CPU_POWERPC
:
strarray_add
(
&
args
,
"-m"
);
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"elf64ppc"
:
"elf32ppc"
);
break
;
default:
strarray_add
(
&
args
,
"-m"
);
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"elf_x86_64"
:
"elf_i386"
);
break
;
}
strarray_add
(
&
args
,
"-m"
);
strarray_add
(
&
args
,
(
force_pointer_size
==
8
)
?
"elf_x86_64"
:
"elf_i386"
);
break
;
}
}
...
...
@@ -941,7 +923,6 @@ unsigned int get_alignment(unsigned int align)
case
CPU_x86_64
:
if
(
target_platform
!=
PLATFORM_APPLE
)
return
align
;
/* fall through */
case
CPU_POWERPC
:
case
CPU_ARM
:
case
CPU_ARM64
:
n
=
0
;
...
...
@@ -965,7 +946,6 @@ unsigned int get_ptr_size(void)
switch
(
target_cpu
)
{
case
CPU_x86
:
case
CPU_POWERPC
:
case
CPU_ARM
:
return
4
;
case
CPU_x86_64
:
...
...
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