aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-04-13 17:17:28 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-04-13 17:17:28 +0000
commitc24b537399e872378ce117080928bd6c890c85f7 (patch)
treed1139bbbb394c417d9a182354b00621d19459ccf /lib/Target/Alpha/AlphaRegisterInfo.cpp
parent556c44e116b2f068913a78c8cbe80c5b4e9abbec (diff)
WOW, function calls still seem to work after this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r--lib/Target/Alpha/AlphaRegisterInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp
index 96a05938f1..eb208a2f2b 100644
--- a/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp
@@ -16,6 +16,7 @@
#include "AlphaRegisterInfo.h"
#include "llvm/Constants.h"
#include "llvm/Type.h"
+#include "llvm/Function.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineFunction.h"
@@ -213,7 +214,10 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const {
//handle GOP offset
MI = BuildMI(Alpha::LDGP, 0);
MBB.insert(MBBI, MI);
-
+ //evil const_cast until MO stuff setup to handle const
+ MI = BuildMI(Alpha::ALTENT, 1).addGlobalAddress(const_cast<Function*>(MF.getFunction()), true);
+ MBB.insert(MBBI, MI);
+
// Get the number of bytes to allocate from the FrameInfo
long NumBytes = MFI->getStackSize();