diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-25 01:51:08 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-01-25 01:51:08 +0000 |
commit | 23918975bfc0864392af0ab5d59952978edbe690 (patch) | |
tree | 9a7dd8315dab5cf1556ffdac99d2fa117331f608 /lib/Target/Alpha/AlphaRegisterInfo.cpp | |
parent | 50d1e8b70d1499e4a5aeba0a92ae9d33712e5f9e (diff) | |
download | external_llvm-23918975bfc0864392af0ab5d59952978edbe690.zip external_llvm-23918975bfc0864392af0ab5d59952978edbe690.tar.gz external_llvm-23918975bfc0864392af0ab5d59952978edbe690.tar.bz2 |
maintaining stackpointer alignment. Perhaps it doesn't matter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25592 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Alpha/AlphaRegisterInfo.cpp')
-rw-r--r-- | lib/Target/Alpha/AlphaRegisterInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaRegisterInfo.cpp b/lib/Target/Alpha/AlphaRegisterInfo.cpp index 1438073..fb93922 100644 --- a/lib/Target/Alpha/AlphaRegisterInfo.cpp +++ b/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); |