summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2005-02-24 18:36:32 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2005-02-24 18:36:32 +0000
commit016947578fde9423aa9a0b42635e60b20a10d015 (patch)
treef3f6649fe8c6e5520ac45193652eb8039ee900e8
parent1807c1a3c9013ab5075faa40add4d69ec5a8a29d (diff)
downloadllvm-016947578fde9423aa9a0b42635e60b20a10d015.tar.gz
llvm-016947578fde9423aa9a0b42635e60b20a10d015.tar.bz2
llvm-016947578fde9423aa9a0b42635e60b20a10d015.tar.xz
fix Allocas. Really. I mean it this time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20306 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/Alpha/AlphaRegisterInfo.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp
index fa8f36b574..7428151279 100644
--- a/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/lib/Target/Alpha/AlphaRegisterInfo.cpp
@@ -220,7 +220,8 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const {
// brackets around call sites.
//If there is a frame pointer, then we don't do this
NumBytes += MFI->getMaxCallFrameSize();
- std::cerr << "Added " << MFI->getMaxCallFrameSize() << " to the stack due to calls\n";
+ DEBUG(std::cerr << "Added " << MFI->getMaxCallFrameSize()
+ << " to the stack due to calls\n");
}
if (FP)
@@ -274,6 +275,10 @@ void AlphaRegisterInfo::emitEpilogue(MachineFunction &MF,
//now if we need to, restore the old FP
if (FP)
{
+ //copy the FP into the SP (discards allocas)
+ MI=BuildMI(Alpha::BIS, 2, Alpha::R30).addReg(Alpha::R15).addReg(Alpha::R15);
+ MBB.insert(MBBI, MI);
+ //restore the FP
MI=BuildMI(Alpha::LDQ, 2, Alpha::R15).addImm(0).addReg(Alpha::R15);
MBB.insert(MBBI, MI);
}