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
c382ed06
Commit
c382ed06
authored
Sep 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added a bit of framework for future x86_64 support.
parent
c72d1329
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
1 deletion
+42
-1
build.h
tools/winebuild/build.h
+3
-1
import.c
tools/winebuild/import.c
+3
-0
main.c
tools/winebuild/main.c
+3
-0
spec32.c
tools/winebuild/spec32.c
+2
-0
utils.c
tools/winebuild/utils.c
+31
-0
No files found.
tools/winebuild/build.h
View file @
c382ed06
...
...
@@ -110,7 +110,7 @@ typedef struct
enum
target_cpu
{
CPU_x86
,
CPU_SPARC
,
CPU_ALPHA
,
CPU_POWERPC
CPU_x86
,
CPU_
x86_64
,
CPU_
SPARC
,
CPU_ALPHA
,
CPU_POWERPC
};
enum
target_platform
...
...
@@ -180,9 +180,11 @@ extern void free_dll_spec( DLLSPEC *spec );
extern
const
char
*
make_c_identifier
(
const
char
*
str
);
extern
unsigned
int
get_alignment
(
unsigned
int
align
);
extern
unsigned
int
get_page_size
(
void
);
extern
unsigned
int
get_ptr_size
(
void
);
extern
const
char
*
asm_name
(
const
char
*
func
);
extern
const
char
*
func_declaration
(
const
char
*
func
);
extern
const
char
*
func_size
(
const
char
*
func
);
extern
const
char
*
get_asm_ptr_keyword
(
void
);
extern
const
char
*
get_asm_string_keyword
(
void
);
extern
const
char
*
get_asm_short_keyword
(
void
);
...
...
tools/winebuild/import.c
View file @
c382ed06
...
...
@@ -632,6 +632,7 @@ static void output_import_thunk( FILE *outfile, const char *name, const char *ta
switch
(
target_cpu
)
{
case
CPU_x86_64
:
/* FIXME */
case
CPU_x86
:
if
(
!
UsePIC
)
{
...
...
@@ -976,6 +977,7 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
"
\"
%s:
\\
n
\"\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
switch
(
target_cpu
)
{
case
CPU_x86_64
:
/* FIXME */
case
CPU_x86
:
fprintf
(
outfile
,
"
\"\\
tpushl %%ecx
\\
n
\\
tpushl %%edx
\\
n
\\
tpushl %%eax
\\
n
\"\n
"
);
fprintf
(
outfile
,
"
\"\\
tcall %s
\\
n
\"\n
"
,
asm_name
(
"__wine_spec_delay_load"
)
);
...
...
@@ -1054,6 +1056,7 @@ static void output_delayed_import_thunks( FILE *outfile, const DLLSPEC *spec )
fprintf
(
outfile
,
"
\"
.L__wine_delay_imp_%d_%s:
\\
n
\"\n
"
,
i
,
name
);
switch
(
target_cpu
)
{
case
CPU_x86_64
:
/* FIXME */
case
CPU_x86
:
fprintf
(
outfile
,
"
\"\\
tmovl $%d, %%eax
\\
n
\"\n
"
,
(
idx
<<
16
)
|
j
);
fprintf
(
outfile
,
"
\"\\
tjmp %s
\\
n
\"\n
"
,
asm_name
(
"__wine_delay_load_asm"
)
);
...
...
tools/winebuild/main.c
View file @
c382ed06
...
...
@@ -49,6 +49,8 @@ int kill_at = 0;
#ifdef __i386__
enum
target_cpu
target_cpu
=
CPU_x86
;
#elif defined(__x86_64__)
enum
target_cpu
target_cpu
=
CPU_x86_64
;
#elif defined(__sparc__)
enum
target_cpu
target_cpu
=
CPU_SPARC
;
#elif defined(__ALPHA__)
...
...
@@ -109,6 +111,7 @@ static const struct
{
"i586"
,
CPU_x86
},
{
"i686"
,
CPU_x86
},
{
"i786"
,
CPU_x86
},
{
"x86_64"
,
CPU_x86_64
},
{
"sparc"
,
CPU_SPARC
},
{
"alpha"
,
CPU_ALPHA
},
{
"powerpc"
,
CPU_POWERPC
}
...
...
tools/winebuild/spec32.c
View file @
c382ed06
...
...
@@ -375,6 +375,7 @@ void output_dll_init( FILE *outfile, const char *constructor, const char *destru
else
switch
(
target_cpu
)
{
case
CPU_x86
:
case
CPU_x86_64
:
if
(
constructor
)
{
fprintf
(
outfile
,
"asm(
\"\\
t.section
\\
t
\\\"
.init
\\\"
,
\\\"
ax
\\\"\\
n
\"\n
"
);
...
...
@@ -502,6 +503,7 @@ void BuildSpec32File( FILE *outfile, DLLSPEC *spec )
switch
(
target_cpu
)
{
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_ALPHA
:
machine
=
IMAGE_FILE_MACHINE_ALPHA
;
break
;
case
CPU_SPARC
:
machine
=
IMAGE_FILE_MACHINE_UNKNOWN
;
break
;
...
...
tools/winebuild/utils.c
View file @
c382ed06
...
...
@@ -349,6 +349,7 @@ unsigned int get_alignment(unsigned int align)
switch
(
target_cpu
)
{
case
CPU_x86
:
case
CPU_x86_64
:
case
CPU_SPARC
:
if
(
target_platform
!=
PLATFORM_APPLE
)
return
align
;
/* fall through */
...
...
@@ -369,6 +370,7 @@ unsigned int get_page_size(void)
switch
(
target_cpu
)
{
case
CPU_x86
:
return
4096
;
case
CPU_x86_64
:
return
4096
;
case
CPU_POWERPC
:
return
4096
;
case
CPU_SPARC
:
return
8192
;
case
CPU_ALPHA
:
return
8192
;
...
...
@@ -378,6 +380,24 @@ unsigned int get_page_size(void)
return
0
;
}
/* return the size of a pointer on the target CPU */
unsigned
int
get_ptr_size
(
void
)
{
switch
(
target_cpu
)
{
case
CPU_x86
:
case
CPU_POWERPC
:
case
CPU_SPARC
:
case
CPU_ALPHA
:
return
4
;
case
CPU_x86_64
:
return
8
;
}
/* unreached */
assert
(
0
);
return
0
;
}
/* return the assembly name for a C symbol */
const
char
*
asm_name
(
const
char
*
sym
)
{
...
...
@@ -433,6 +453,17 @@ const char *func_size( const char *func )
}
}
const
char
*
get_asm_ptr_keyword
(
void
)
{
switch
(
get_ptr_size
())
{
case
4
:
return
".long"
;
case
8
:
return
".quad"
;
}
assert
(
0
);
return
NULL
;
}
const
char
*
get_asm_string_keyword
(
void
)
{
switch
(
target_platform
)
...
...
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