aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-07-22 20:52:16 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-07-22 20:52:16 +0000
commit0934ae02af2e4d295951cea7e4567b065e183451 (patch)
tree40feeb03f423fe8947cb28fc6026e2df4e3279e0 /lib/Target/Alpha/AlphaRegisterInfo.cpp
parentf3f951af3f6b83c7c28c58d5af68ba83f07d1959 (diff)
Alpha JIT (beta)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r--lib/Target/Alpha/AlphaRegisterInfo.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp
index 4f0e1d2c88..f7c3e5402c 100644
--- a/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp
@@ -226,8 +226,16 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const {
MachineFrameInfo *MFI = MF.getFrameInfo();
bool FP = hasFP(MF);
+ static int curgpdist = 0;
+
//handle GOP offset
- BuildMI(MBB, MBBI, Alpha::LDGP, 0);
+ BuildMI(MBB, MBBI, Alpha::LDAHg, 3, Alpha::R29)
+ .addGlobalAddress(const_cast<Function*>(MF.getFunction()))
+ .addReg(Alpha::R27).addImm(++curgpdist);
+ BuildMI(MBB, MBBI, Alpha::LDAg, 3, Alpha::R29)
+ .addGlobalAddress(const_cast<Function*>(MF.getFunction()))
+ .addReg(Alpha::R29).addImm(curgpdist);
+
//evil const_cast until MO stuff setup to handle const
BuildMI(MBB, MBBI, Alpha::ALTENT, 1).addGlobalAddress(const_cast<Function*>(MF.getFunction()), true);