projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b37637
)
Do not reserve $gp as a dedicated global base register if the target ABI is not O32.
author
Akira Hatanaka
<ahatanaka@mips.com>
Tue, 28 Feb 2012 03:17:38 +0000
(
03:17
+0000)
committer
Akira Hatanaka
<ahatanaka@mips.com>
Tue, 28 Feb 2012 03:17:38 +0000
(
03:17
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151614
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Target/Mips/MipsISelDAGToDAG.cpp
patch
|
blob
|
history
diff --git
a/lib/Target/Mips/MipsISelDAGToDAG.cpp
b/lib/Target/Mips/MipsISelDAGToDAG.cpp
index f60a15e9e565634487fb73b9fae13eed16e96ba4..a1e50b791d8cb7ad360ef8f48ea17fee0db20910 100644
(file)
--- a/
lib/Target/Mips/MipsISelDAGToDAG.cpp
+++ b/
lib/Target/Mips/MipsISelDAGToDAG.cpp
@@
-126,7
+126,8
@@
void MipsDAGToDAGISel::InitGlobalBaseReg(MachineFunction &MF) {
unsigned V0, V1, GlobalBaseReg = MipsFI->getGlobalBaseReg();
bool FixGlobalBaseReg = MipsFI->globalBaseRegFixed();
- if (FixGlobalBaseReg) // $gp is the global base register.
+ if (Subtarget.isABI_O32() && FixGlobalBaseReg)
+ // $gp is the global base register.
V0 = V1 = GlobalBaseReg;
else {
const TargetRegisterClass *RC;