summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit93341a0f8296055c813810928c8d1f0dc997e80f (patch)
tree412c97c2249df8523404f9a33193b5c58cf31a24 /llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
parentc3621316ee7a4d233eb4db4d7d946292014cf404 (diff)
downloadbcm5719-llvm-93341a0f8296055c813810928c8d1f0dc997e80f.tar.gz
bcm5719-llvm-93341a0f8296055c813810928c8d1f0dc997e80f.zip
WOW, function calls still seem to work after this.
llvm-svn: 21286
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp b/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
index 96a05938f1a..eb208a2f2b4 100644
--- a/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud