summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-03-09 04:49:13 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-03-09 04:49:13 +0000
commit3a27bd889b325995e18eae57aa59170f3eec620c (patch)
treef4134f6ddc1c052c47d9afbf50336ecd6b01fb6c /llvm
parent8a3f2f36002f406f5ef6ef473ab28808fd7f61fe (diff)
downloadbcm5719-llvm-3a27bd889b325995e18eae57aa59170f3eec620c.tar.gz
bcm5719-llvm-3a27bd889b325995e18eae57aa59170f3eec620c.zip
Hmm, who left this sitting around in my tree
llvm-svn: 12255
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/SparcV8/InstSelectSimple.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Target/SparcV8/InstSelectSimple.cpp b/llvm/lib/Target/SparcV8/InstSelectSimple.cpp
index ec331ee8fb9..90fdacbeeef 100644
--- a/llvm/lib/Target/SparcV8/InstSelectSimple.cpp
+++ b/llvm/lib/Target/SparcV8/InstSelectSimple.cpp
@@ -125,10 +125,10 @@ namespace {
RegMap.erase(V); // Assign a new name to this constant if ref'd again
} else if (GlobalValue *GV = dyn_cast<GlobalValue>(V)) {
// Move the address of the global into the register
- // X86 does:
- // BuildMI(*MBB, IPt, V8::ORrr, 2, Reg).addReg(G0).addGlobalAddress(GV);
- // We need to use SETHI and OR.
- assert (0 && "Can't move address of global yet");
+ unsigned TmpReg = makeAnotherReg(V->getType());
+ BuildMI (*MBB, IPt, V8::SETHIi, 1, TmpReg).addGlobalAddress (GV);
+ BuildMI (*MBB, IPt, V8::ORri, 2, Reg).addReg (TmpReg)
+ .addGlobalAddress (GV);
RegMap.erase(V); // Assign a new name to this address if ref'd again
}
OpenPOWER on IntegriCloud