Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
27fb36b3
Commit
27fb36b3
authored
Nov 17, 2009
by
André Hentschel
Committed by
Alexandre Julliard
Nov 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winebuild: Add ARM support.
parent
762280ea
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
4 deletions
+45
-4
build.h
tools/winebuild/build.h
+1
-1
import.c
tools/winebuild/import.c
+12
-0
main.c
tools/winebuild/main.c
+2
-0
spec32.c
tools/winebuild/spec32.c
+7
-0
utils.c
tools/winebuild/utils.c
+23
-3
No files found.
tools/winebuild/build.h
View file @
27fb36b3
...
@@ -119,7 +119,7 @@ typedef struct
...
@@ -119,7 +119,7 @@ typedef struct
enum
target_cpu
enum
target_cpu
{
{
CPU_x86
,
CPU_x86_64
,
CPU_SPARC
,
CPU_ALPHA
,
CPU_POWERPC
CPU_x86
,
CPU_x86_64
,
CPU_SPARC
,
CPU_ALPHA
,
CPU_POWERPC
,
CPU_ARM
};
};
enum
target_platform
enum
target_platform
...
...
tools/winebuild/import.c
View file @
27fb36b3
...
@@ -699,6 +699,10 @@ static void output_import_thunk( const char *name, const char *table, int pos )
...
@@ -699,6 +699,10 @@ static void output_import_thunk( const char *name, const char *table, int pos )
output
(
"
\t
lda $0,%d($0)
\n
"
,
pos
);
output
(
"
\t
lda $0,%d($0)
\n
"
,
pos
);
output
(
"
\t
jmp $31,($0)
\n
"
);
output
(
"
\t
jmp $31,($0)
\n
"
);
break
;
break
;
case
CPU_ARM
:
output
(
"
\t
mov r4, #%s
\n
"
,
table
);
output
(
"
\t
ldr r15, [r4, #%d]
\n
"
,
pos
);
break
;
case
CPU_POWERPC
:
case
CPU_POWERPC
:
output
(
"
\t
mr %s, %s
\n
"
,
ppc_reg
(
0
),
ppc_reg
(
31
)
);
output
(
"
\t
mr %s, %s
\n
"
,
ppc_reg
(
0
),
ppc_reg
(
31
)
);
if
(
target_platform
==
PLATFORM_APPLE
)
if
(
target_platform
==
PLATFORM_APPLE
)
...
@@ -1005,6 +1009,11 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
...
@@ -1005,6 +1009,11 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output
(
"
\t
jsr $26,%s
\n
"
,
asm_name
(
"__wine_spec_delay_load"
)
);
output
(
"
\t
jsr $26,%s
\n
"
,
asm_name
(
"__wine_spec_delay_load"
)
);
output
(
"
\t
jmp $31,($0)
\n
"
);
output
(
"
\t
jmp $31,($0)
\n
"
);
break
;
break
;
case
CPU_ARM
:
output
(
"
\t
stmfd sp!, {r4, r5, r6, r7, r8, r9, r10, lr}
\n
"
);
output
(
"
\t
blx %s
\n
"
,
asm_name
(
"__wine_spec_delay_load"
)
);
output
(
"
\t
ldmfd sp!, {r4, r5, r6, r7, r8, r9, r10, pc}
\n
"
);
break
;
case
CPU_POWERPC
:
case
CPU_POWERPC
:
if
(
target_platform
==
PLATFORM_APPLE
)
extra_stack_storage
=
56
;
if
(
target_platform
==
PLATFORM_APPLE
)
extra_stack_storage
=
56
;
...
@@ -1088,6 +1097,9 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
...
@@ -1088,6 +1097,9 @@ static void output_delayed_import_thunks( const DLLSPEC *spec )
output
(
"
\t
ldah $0,%d($0)
\n
"
,
idx
);
output
(
"
\t
ldah $0,%d($0)
\n
"
,
idx
);
output
(
"
\t
jmp $31,%s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
output
(
"
\t
jmp $31,%s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
break
;
break
;
case
CPU_ARM
:
output
(
"
\t
b %s
\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
break
;
case
CPU_POWERPC
:
case
CPU_POWERPC
:
switch
(
target_platform
)
switch
(
target_platform
)
{
{
...
...
tools/winebuild/main.c
View file @
27fb36b3
...
@@ -58,6 +58,8 @@ enum target_cpu target_cpu = CPU_SPARC;
...
@@ -58,6 +58,8 @@ enum target_cpu target_cpu = CPU_SPARC;
enum
target_cpu
target_cpu
=
CPU_ALPHA
;
enum
target_cpu
target_cpu
=
CPU_ALPHA
;
#elif defined(__powerpc__)
#elif defined(__powerpc__)
enum
target_cpu
target_cpu
=
CPU_POWERPC
;
enum
target_cpu
target_cpu
=
CPU_POWERPC
;
#elif defined(__arm__)
enum
target_cpu
target_cpu
=
CPU_ARM
;
#else
#else
#error Unsupported CPU
#error Unsupported CPU
#endif
#endif
...
...
tools/winebuild/spec32.c
View file @
27fb36b3
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#define IMAGE_FILE_MACHINE_ALPHA 0x0184
#define IMAGE_FILE_MACHINE_ALPHA 0x0184
#define IMAGE_FILE_MACHINE_POWERPC 0x01f0
#define IMAGE_FILE_MACHINE_POWERPC 0x01f0
#define IMAGE_FILE_MACHINE_AMD64 0x8664
#define IMAGE_FILE_MACHINE_AMD64 0x8664
#define IMAGE_FILE_MACHINE_ARM 0x01C0
#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
#define IMAGE_SIZEOF_NT_OPTIONAL32_HEADER 224
#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
#define IMAGE_SIZEOF_NT_OPTIONAL64_HEADER 240
...
@@ -369,6 +370,9 @@ static void output_asm_constructor( const char *constructor )
...
@@ -369,6 +370,9 @@ static void output_asm_constructor( const char *constructor )
case
CPU_ALPHA
:
case
CPU_ALPHA
:
output
(
"
\t
jsr $26,%s
\n
"
,
asm_name
(
constructor
)
);
output
(
"
\t
jsr $26,%s
\n
"
,
asm_name
(
constructor
)
);
break
;
break
;
case
CPU_ARM
:
output
(
"
\t
blx %s
\n
"
,
asm_name
(
constructor
)
);
break
;
case
CPU_POWERPC
:
case
CPU_POWERPC
:
output
(
"
\t
bl %s
\n
"
,
asm_name
(
constructor
)
);
output
(
"
\t
bl %s
\n
"
,
asm_name
(
constructor
)
);
break
;
break
;
...
@@ -412,6 +416,7 @@ void output_module( DLLSPEC *spec )
...
@@ -412,6 +416,7 @@ void output_module( DLLSPEC *spec )
case
CPU_SPARC
:
case
CPU_SPARC
:
output
(
"
\t
jmp 1f
\n
"
);
output
(
"
\t
jmp 1f
\n
"
);
break
;
break
;
case
CPU_ARM
:
case
CPU_POWERPC
:
case
CPU_POWERPC
:
output
(
"
\t
b 1f
\n
"
);
output
(
"
\t
b 1f
\n
"
);
break
;
break
;
...
@@ -434,6 +439,7 @@ void output_module( DLLSPEC *spec )
...
@@ -434,6 +439,7 @@ void output_module( DLLSPEC *spec )
{
{
case
CPU_x86
:
machine
=
IMAGE_FILE_MACHINE_I386
;
break
;
case
CPU_x86
:
machine
=
IMAGE_FILE_MACHINE_I386
;
break
;
case
CPU_x86_64
:
machine
=
IMAGE_FILE_MACHINE_AMD64
;
break
;
case
CPU_x86_64
:
machine
=
IMAGE_FILE_MACHINE_AMD64
;
break
;
case
CPU_ARM
:
machine
=
IMAGE_FILE_MACHINE_ARM
;
break
;
case
CPU_POWERPC
:
machine
=
IMAGE_FILE_MACHINE_POWERPC
;
break
;
case
CPU_POWERPC
:
machine
=
IMAGE_FILE_MACHINE_POWERPC
;
break
;
case
CPU_ALPHA
:
machine
=
IMAGE_FILE_MACHINE_ALPHA
;
break
;
case
CPU_ALPHA
:
machine
=
IMAGE_FILE_MACHINE_ALPHA
;
break
;
case
CPU_SPARC
:
machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
break
;
case
CPU_SPARC
:
machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
break
;
...
@@ -623,6 +629,7 @@ void output_fake_module( DLLSPEC *spec )
...
@@ -623,6 +629,7 @@ void output_fake_module( DLLSPEC *spec )
case
CPU_POWERPC
:
put_word
(
IMAGE_FILE_MACHINE_POWERPC
);
break
;
case
CPU_POWERPC
:
put_word
(
IMAGE_FILE_MACHINE_POWERPC
);
break
;
case
CPU_ALPHA
:
put_word
(
IMAGE_FILE_MACHINE_ALPHA
);
break
;
case
CPU_ALPHA
:
put_word
(
IMAGE_FILE_MACHINE_ALPHA
);
break
;
case
CPU_SPARC
:
put_word
(
IMAGE_FILE_MACHINE_UNKNOWN
);
break
;
case
CPU_SPARC
:
put_word
(
IMAGE_FILE_MACHINE_UNKNOWN
);
break
;
case
CPU_ARM
:
put_word
(
IMAGE_FILE_MACHINE_ARM
);
break
;
}
}
put_word
(
nb_sections
);
/* NumberOfSections */
put_word
(
nb_sections
);
/* NumberOfSections */
put_dword
(
0
);
/* TimeDateStamp */
put_dword
(
0
);
/* TimeDateStamp */
...
...
tools/winebuild/utils.c
View file @
27fb36b3
...
@@ -57,7 +57,8 @@ static const struct
...
@@ -57,7 +57,8 @@ static const struct
{
"x86_64"
,
CPU_x86_64
},
{
"x86_64"
,
CPU_x86_64
},
{
"sparc"
,
CPU_SPARC
},
{
"sparc"
,
CPU_SPARC
},
{
"alpha"
,
CPU_ALPHA
},
{
"alpha"
,
CPU_ALPHA
},
{
"powerpc"
,
CPU_POWERPC
}
{
"powerpc"
,
CPU_POWERPC
},
{
"arm"
,
CPU_ARM
}
};
};
/* atexit handler to clean tmp files */
/* atexit handler to clean tmp files */
...
@@ -795,6 +796,7 @@ unsigned int get_alignment(unsigned int align)
...
@@ -795,6 +796,7 @@ unsigned int get_alignment(unsigned int align)
case
CPU_x86
:
case
CPU_x86
:
case
CPU_x86_64
:
case
CPU_x86_64
:
case
CPU_SPARC
:
case
CPU_SPARC
:
case
CPU_ARM
:
if
(
target_platform
!=
PLATFORM_APPLE
)
return
align
;
if
(
target_platform
!=
PLATFORM_APPLE
)
return
align
;
/* fall through */
/* fall through */
case
CPU_POWERPC
:
case
CPU_POWERPC
:
...
@@ -816,6 +818,7 @@ unsigned int get_page_size(void)
...
@@ -816,6 +818,7 @@ unsigned int get_page_size(void)
case
CPU_x86
:
return
4096
;
case
CPU_x86
:
return
4096
;
case
CPU_x86_64
:
return
4096
;
case
CPU_x86_64
:
return
4096
;
case
CPU_POWERPC
:
return
4096
;
case
CPU_POWERPC
:
return
4096
;
case
CPU_ARM
:
return
4096
;
case
CPU_SPARC
:
return
8192
;
case
CPU_SPARC
:
return
8192
;
case
CPU_ALPHA
:
return
8192
;
case
CPU_ALPHA
:
return
8192
;
}
}
...
@@ -833,6 +836,7 @@ unsigned int get_ptr_size(void)
...
@@ -833,6 +836,7 @@ unsigned int get_ptr_size(void)
case
CPU_POWERPC
:
case
CPU_POWERPC
:
case
CPU_SPARC
:
case
CPU_SPARC
:
case
CPU_ALPHA
:
case
CPU_ALPHA
:
case
CPU_ARM
:
return
4
;
return
4
;
case
CPU_x86_64
:
case
CPU_x86_64
:
return
8
;
return
8
;
...
@@ -873,7 +877,15 @@ const char *func_declaration( const char *func )
...
@@ -873,7 +877,15 @@ const char *func_declaration( const char *func )
sprintf
(
buffer
,
".def _%s; .scl 2; .type 32; .endef"
,
func
);
sprintf
(
buffer
,
".def _%s; .scl 2; .type 32; .endef"
,
func
);
break
;
break
;
default:
default:
sprintf
(
buffer
,
".type %s,@function"
,
func
);
switch
(
target_cpu
)
{
case
CPU_ARM
:
sprintf
(
buffer
,
".type %s,%%function"
,
func
);
break
;
default:
sprintf
(
buffer
,
".type %s,@function"
,
func
);
break
;
}
break
;
break
;
}
}
return
buffer
;
return
buffer
;
...
@@ -902,7 +914,15 @@ void output_gnu_stack_note(void)
...
@@ -902,7 +914,15 @@ void output_gnu_stack_note(void)
case
PLATFORM_APPLE
:
case
PLATFORM_APPLE
:
break
;
break
;
default:
default:
output
(
"
\t
.section .note.GNU-stack,
\"\"
,@progbits
\n
"
);
switch
(
target_cpu
)
{
case
CPU_ARM
:
output
(
"
\t
.section .note.GNU-stack,
\"\"
,%%progbits
\n
"
);
break
;
default:
output
(
"
\t
.section .note.GNU-stack,
\"\"
,@progbits
\n
"
);
break
;
}
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