summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-01-25 01:51:08 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-01-25 01:51:08 +0000
commit94150f0666858c07d41113c0a4059e5bdea866b4 (patch)
tree0bfd2e59e374f3ac36c0ea0a220bc112238e5cb7 /llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
parent1dbc389ad20de80af1dfb4db9a5f5b6e15223ad3 (diff)
downloadbcm5719-llvm-94150f0666858c07d41113c0a4059e5bdea866b4.tar.gz
bcm5719-llvm-94150f0666858c07d41113c0a4059e5bdea866b4.zip
maintaining stackpointer alignment. Perhaps it doesn't matter
llvm-svn: 25592
Diffstat (limited to 'llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r--llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp b/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
index 1438073279c..fb93922aec5 100644
--- a/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
+++ b/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp
@@ -257,6 +257,7 @@ AlphaRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II) const {
" for stack size: " << MF.getFrameInfo()->getStackSize() << "\n");
if (Offset > IMM_HIGH || Offset < IMM_LOW) {
+ std::cerr << "Unconditionally using R28 for evil purposes\n";
//so in this case, we need to use a temporary register, and move the original
//inst off the SP/FP
//fix up the old:
@@ -311,6 +312,9 @@ void AlphaRegisterInfo::emitPrologue(MachineFunction &MF) const {
// Do we need to allocate space on the stack?
if (NumBytes == 0) return;
+ unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment();
+ NumBytes = (NumBytes+Align-1)/Align*Align;
+
// Update frame info to pretend that this is part of the stack...
MFI->setStackSize(NumBytes);
OpenPOWER on IntegriCloud