diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-08-07 19:08:11 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-08-07 19:08:11 +0000 |
| commit | 7da151cd5deb9f77ea68806633f3a1ccc3e7c903 (patch) | |
| tree | 3f11d871a8bdf50b588fc1018e957136c367c5e5 /lib/Target/Mips/MipsRegisterInfo.cpp | |
| parent | e36bfe678df09f46e1eac60b15105c1ccd2c5382 (diff) | |
Added Mips support for DYNAMIC_STACKALLOC
Fixed bug in adjustMipsStackFrame, which was breaking
while trying to access a dead stack object index. Also added
one more alignment before fixing the callee saved registers
stack offset adjustment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54485 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/MipsRegisterInfo.cpp')
| -rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index 424cf03f6b..6d75f460d3 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -249,6 +249,8 @@ void MipsRegisterInfo::adjustMipsStackFrame(MachineFunction &MF) const for (int i = 0, e = MFI->getObjectIndexEnd(); i != e; ++i) { if (i >= MinCSFI && i <= MaxCSFI) continue; + if (MFI->isDeadObjectIndex(i)) + continue; unsigned Offset = MFI->getObjectOffset(i) - CalleeSavedAreaSize; if (LastOffsetFI == -1) LastOffsetFI = i; @@ -266,6 +268,7 @@ void MipsRegisterInfo::adjustMipsStackFrame(MachineFunction &MF) const if (LastOffsetFI >= 0) StackOffset = MFI->getObjectOffset(LastOffsetFI)+ MFI->getObjectAlignment(LastOffsetFI); + StackOffset = ((StackOffset+StackAlign-1)/StackAlign*StackAlign); for (unsigned i = 0, e = CSI.size(); i != e ; ++i) { if (CSI[i].getRegClass() != Mips::CPURegsRegisterClass) |
