Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
llvm-epi-0.8
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Roger Ferrer
llvm-epi-0.8
Commits
cdde9990
Commit
cdde9990
authored
19 years ago
by
Chris Lattner
Browse files
Options
Downloads
Patches
Plain Diff
only use dyld stubs if not in ppc-static mode. This completes support for
non-static codegen. llvm-svn: 24403
parent
bca0be81
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+21
-15
21 additions, 15 deletions
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
with
21 additions
and
15 deletions
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
+
21
−
15
View file @
cdde9990
...
@@ -154,20 +154,24 @@ namespace {
...
@@ -154,20 +154,24 @@ namespace {
void
printCallOperand
(
const
MachineInstr
*
MI
,
unsigned
OpNo
,
void
printCallOperand
(
const
MachineInstr
*
MI
,
unsigned
OpNo
,
MVT
::
ValueType
VT
)
{
MVT
::
ValueType
VT
)
{
const
MachineOperand
&
MO
=
MI
->
getOperand
(
OpNo
);
const
MachineOperand
&
MO
=
MI
->
getOperand
(
OpNo
);
if
(
MO
.
getType
()
==
MachineOperand
::
MO_ExternalSymbol
)
{
if
(
!
PPCGenerateStaticCode
)
{
std
::
string
Name
(
GlobalPrefix
);
Name
+=
MO
.
getSymbolName
();
if
(
MO
.
getType
()
==
MachineOperand
::
MO_ExternalSymbol
)
{
FnStubs
.
insert
(
Name
);
std
::
string
Name
(
GlobalPrefix
);
Name
+=
MO
.
getSymbolName
();
O
<<
"L"
<<
Name
<<
"$stub"
;
FnStubs
.
insert
(
Name
);
}
else
if
(
MO
.
getType
()
==
MachineOperand
::
MO_GlobalAddress
&&
O
<<
"L"
<<
Name
<<
"$stub"
;
isa
<
Function
>
(
MO
.
getGlobal
())
&&
return
;
cast
<
Function
>
(
MO
.
getGlobal
())
->
isExternal
())
{
}
else
if
(
MO
.
getType
()
==
MachineOperand
::
MO_GlobalAddress
&&
// Dynamically-resolved functions need a stub for the function.
isa
<
Function
>
(
MO
.
getGlobal
())
&&
std
::
string
Name
=
Mang
->
getValueName
(
MO
.
getGlobal
());
cast
<
Function
>
(
MO
.
getGlobal
())
->
isExternal
())
{
FnStubs
.
insert
(
Name
);
// Dynamically-resolved functions need a stub for the function.
O
<<
"L"
<<
Name
<<
"$stub"
;
std
::
string
Name
=
Mang
->
getValueName
(
MO
.
getGlobal
());
}
else
{
FnStubs
.
insert
(
Name
);
printOp
(
MI
->
getOperand
(
OpNo
));
O
<<
"L"
<<
Name
<<
"$stub"
;
return
;
}
}
}
printOp
(
MI
->
getOperand
(
OpNo
));
}
}
void
printAbsAddrOperand
(
const
MachineInstr
*
MI
,
unsigned
OpNo
,
void
printAbsAddrOperand
(
const
MachineInstr
*
MI
,
unsigned
OpNo
,
MVT
::
ValueType
VT
)
{
MVT
::
ValueType
VT
)
{
...
@@ -334,7 +338,9 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
...
@@ -334,7 +338,9 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
std
::
string
Name
=
Mang
->
getValueName
(
GV
);
std
::
string
Name
=
Mang
->
getValueName
(
GV
);
// External or weakly linked global variables need non-lazily-resolved stubs
// External or weakly linked global variables need non-lazily-resolved stubs
if
((
GV
->
isExternal
()
||
GV
->
hasWeakLinkage
()
||
GV
->
hasLinkOnceLinkage
())){
if
(
!
PPCGenerateStaticCode
&&
((
GV
->
isExternal
()
||
GV
->
hasWeakLinkage
()
||
GV
->
hasLinkOnceLinkage
())))
{
if
(
GV
->
hasLinkOnceLinkage
())
if
(
GV
->
hasLinkOnceLinkage
())
LinkOnceStubs
.
insert
(
Name
);
LinkOnceStubs
.
insert
(
Name
);
else
else
...
@@ -343,7 +349,7 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
...
@@ -343,7 +349,7 @@ void PPCAsmPrinter::printOp(const MachineOperand &MO) {
return
;
return
;
}
}
O
<<
Mang
->
getValueName
(
GV
)
;
O
<<
Name
;
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment