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
e961418b
Commit
e961418b
authored
Oct 27, 2003
by
Pierre d'Herbemont
Committed by
Alexandre Julliard
Oct 27, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PowerPC assembler syntax mistakes.
parent
a2977cf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
29 deletions
+29
-29
import.c
tools/winebuild/import.c
+29
-29
No files found.
tools/winebuild/import.c
View file @
e961418b
...
...
@@ -1006,24 +1006,24 @@ static int output_delayed_imports( FILE *outfile )
fprintf
(
outfile
,
"
\"\\
tjmp %%o0
\\
n
\\
trestore
\\
n
\"\n
"
);
#elif defined(__powerpc__)
/* Save all callee saved registers into a stackframe. */
fprintf
(
outfile
,
"
\"\\
tstwu %s, -48
, %s
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 4
, %s
\\
n
\"\n
"
,
ppc_reg
[
3
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 8
, %s
\\
n
\"\n
"
,
ppc_reg
[
4
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 12
, %s
\\
n
\"\n
"
,
ppc_reg
[
5
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 16
, %s
\\
n
\"\n
"
,
ppc_reg
[
6
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 20
, %s
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 24
, %s
\\
n
\"\n
"
,
ppc_reg
[
8
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 28
, %s
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 32
, %s
\\
n
\"\n
"
,
ppc_reg
[
10
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 36
, %s
\\
n
\"\n
"
,
ppc_reg
[
11
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 40
, %s
\\
n
\"\n
"
,
ppc_reg
[
12
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstwu %s, -48
(%s)
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 4
(%s)
\\
n
\"\n
"
,
ppc_reg
[
3
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 8
(%s)
\\
n
\"\n
"
,
ppc_reg
[
4
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 12
(%s)
\\
n
\"\n
"
,
ppc_reg
[
5
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 16
(%s)
\\
n
\"\n
"
,
ppc_reg
[
6
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 20
(%s)
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 24
(%s)
\\
n
\"\n
"
,
ppc_reg
[
8
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 28
(%s)
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 32
(%s)
\\
n
\"\n
"
,
ppc_reg
[
10
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 36
(%s)
\\
n
\"\n
"
,
ppc_reg
[
11
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 40
(%s)
\\
n
\"\n
"
,
ppc_reg
[
12
],
ppc_reg
[
1
]);
/* r0 -> r3 (arg1) */
fprintf
(
outfile
,
"
\"\\
tmr %s, %s
\\
n
\"\n
"
,
ppc_reg
[
3
],
ppc_reg
[
0
]);
/* save return address */
fprintf
(
outfile
,
"
\"\\
tmflr %s
\\
n
\"\n
"
,
ppc_reg
[
0
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 44
, %s
\\
n
\"\n
"
,
ppc_reg
[
0
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tstw %s, 44
(%s)
\\
n
\"\n
"
,
ppc_reg
[
0
],
ppc_reg
[
1
]);
/* Call the __wine_delay_load function, arg1 is arg1. */
fprintf
(
outfile
,
"
\"\\
tbl "
__ASM_NAME
(
"__wine_delay_load"
)
"
\\
n
\"\n
"
);
...
...
@@ -1032,19 +1032,19 @@ static int output_delayed_imports( FILE *outfile )
fprintf
(
outfile
,
"
\"\\
tmtctr %s
\\
n
\"\n
"
,
ppc_reg
[
3
]);
/* restore all saved registers and drop stackframe. */
fprintf
(
outfile
,
"
\"\\
tlwz %s, 4
, %s
\\
n
\"\n
"
,
ppc_reg
[
3
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 8
, %s
\\
n
\"\n
"
,
ppc_reg
[
4
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 12
, %s
\\
n
\"\n
"
,
ppc_reg
[
5
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 16
, %s
\\
n
\"\n
"
,
ppc_reg
[
6
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 20
, %s
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 24
, %s
\\
n
\"\n
"
,
ppc_reg
[
8
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 28
, %s
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 32
, %s
\\
n
\"\n
"
,
ppc_reg
[
10
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 36
, %s
\\
n
\"\n
"
,
ppc_reg
[
11
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 40
, %s
\\
n
\"\n
"
,
ppc_reg
[
12
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 4
(%s)
\\
n
\"\n
"
,
ppc_reg
[
3
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 8
(%s)
\\
n
\"\n
"
,
ppc_reg
[
4
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 12
(%s)
\\
n
\"\n
"
,
ppc_reg
[
5
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 16
(%s)
\\
n
\"\n
"
,
ppc_reg
[
6
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 20
(%s)
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 24
(%s)
\\
n
\"\n
"
,
ppc_reg
[
8
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 28
(%s)
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 32
(%s)
\\
n
\"\n
"
,
ppc_reg
[
10
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 36
(%s)
\\
n
\"\n
"
,
ppc_reg
[
11
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 40
(%s)
\\
n
\"\n
"
,
ppc_reg
[
12
],
ppc_reg
[
1
]);
/* Load return value from call into return register */
fprintf
(
outfile
,
"
\"\\
tlwz %s, 44
, %s
\\
n
\"\n
"
,
ppc_reg
[
0
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tlwz %s, 44
(%s)
\\
n
\"\n
"
,
ppc_reg
[
0
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\"\\
tmtlr %s
\\
n
\"\n
"
,
ppc_reg
[
0
]);
fprintf
(
outfile
,
"
\"\\
taddi %s, %s, 48
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
...
...
@@ -1072,8 +1072,8 @@ static int output_delayed_imports( FILE *outfile )
#elif defined(__powerpc__)
/* g0 is a function scratch register or so I understand. */
/* First load the upper half-word, and then the lower part */
fprintf
(
outfile
,
"
\"\\
lis %s, %d
\\
n
\"\n
"
,
ppc_reg
[
0
],
idx
);
fprintf
(
outfile
,
"
\"\\
t
addi %s, %s, %d
\\
n
\"\n
"
,
ppc_reg
[
0
]
,
ppc_reg
[
0
],
j
);
fprintf
(
outfile
,
"
\"\\
t
lis %s, %d
\\
n
\"\n
"
,
ppc_reg
[
0
],
idx
);
fprintf
(
outfile
,
"
\"\\
t
li %s, %d
\\
n
\"\n
"
,
ppc_reg
[
0
],
j
);
fprintf
(
outfile
,
"
\"\\
tb "
__ASM_NAME
(
"__wine_delay_load_asm"
)
"
\\
n
\"\n
"
);
#else
#error You need to defined delayed import thunks for your architecture!
...
...
@@ -1118,14 +1118,14 @@ static int output_delayed_imports( FILE *outfile )
}
#elif defined(__powerpc__)
fprintf
(
outfile
,
"
\t
addi %s, %s, -0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t
\"
addi %s, %s, -0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tstw %s, 0(%s)
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
taddi %s, %s, -0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tstw %s, 0(%s)
\\
n
\"\n
"
,
ppc_reg
[
8
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
taddi %s, %s, -0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tstw %s, 0(%s)
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tlis %s "
ppc_high
(
__ASM_NAME
(
"imports"
)
"+ %d"
)
"
\\
n
\"\n
"
,
ppc_reg
[
9
],
pos
);
fprintf
(
outfile
,
"
\t\"\\
tla %s "
ppc_low
(
__ASM_NAME
(
"imports"
)
"+ %d"
)
"(%s)
\\
n
\"\n
"
,
ppc_reg
[
8
],
pos
,
ppc_reg
[
9
]);
fprintf
(
outfile
,
"
\t\"\\
tlis %s
,
"
ppc_high
(
__ASM_NAME
(
"imports"
)
"+ %d"
)
"
\\
n
\"\n
"
,
ppc_reg
[
9
],
pos
);
fprintf
(
outfile
,
"
\t\"\\
tla %s
,
"
ppc_low
(
__ASM_NAME
(
"imports"
)
"+ %d"
)
"(%s)
\\
n
\"\n
"
,
ppc_reg
[
8
],
pos
,
ppc_reg
[
9
]);
fprintf
(
outfile
,
"
\t\"\\
tlwz %s, 0(%s)
\\
n
\"\n
"
,
ppc_reg
[
7
],
ppc_reg
[
8
]);
fprintf
(
outfile
,
"
\t\"\\
tmtctr %s
\\
n
\"\n
"
,
ppc_reg
[
7
]);
...
...
@@ -1135,7 +1135,7 @@ static int output_delayed_imports( FILE *outfile )
fprintf
(
outfile
,
"
\t\"\\
taddi %s, %s, 0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tlwz %s, 0(%s)
\\
n
\"\n
"
,
ppc_reg
[
9
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
taddi %s, %s, 0x4
\\
n
\"\n
"
,
ppc_reg
[
1
],
ppc_reg
[
1
]);
fprintf
(
outfile
,
"
\t\"\\
tbctr
\\
n"
);
fprintf
(
outfile
,
"
\t\"\\
tbctr
\\
n
\"
"
);
#else
#error You need to define delayed import thunks for your architecture!
#endif
...
...
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