aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-10-13 09:11:46 +0000
committerEric Christopher <echristo@apple.com>2010-10-13 09:11:46 +0000
commitede42b0a22fdb57eb70d0d8c780dc5d3283397c0 (patch)
tree95840b017c443d01ca09b015d7459d0212d05b5b /lib
parentc502101000b53eca25ef45068f57669d12d617bf (diff)
downloadexternal_llvm-ede42b0a22fdb57eb70d0d8c780dc5d3283397c0.zip
external_llvm-ede42b0a22fdb57eb70d0d8c780dc5d3283397c0.tar.gz
external_llvm-ede42b0a22fdb57eb70d0d8c780dc5d3283397c0.tar.bz2
Start handling more global variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116401 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/ARM/ARMFastISel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/Target/ARM/ARMFastISel.cpp b/lib/Target/ARM/ARMFastISel.cpp
index 418a985..4a2a58e 100644
--- a/lib/Target/ARM/ARMFastISel.cpp
+++ b/lib/Target/ARM/ARMFastISel.cpp
@@ -620,8 +620,11 @@ bool ARMFastISel::ARMComputeRegOffset(const Value *Obj, unsigned &Reg,
// FIXME: Handle global variables.
if (const GlobalValue *GV = dyn_cast<GlobalValue>(Obj)) {
- (void)GV;
- return false;
+ unsigned Tmp = ARMMaterializeGV(GV, TLI.getValueType(Obj->getType()));
+ if (Tmp == 0) return false;
+
+ Reg = Tmp;
+ return true;
}
// Try to get this in a register if nothing else has worked.