Fixed call stack alignment. Improved AsmPrinter alignment issues.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bruno Cardoso Lopes
2008-07-15 02:03:36 +00:00
parent f0d286b77f
commit b27cb55923
5 changed files with 47 additions and 18 deletions

View File

@@ -267,7 +267,7 @@ emitPrologue(MachineFunction &MF) const
#endif
// No need to allocate space on the stack.
if (NumBytes == 0) return;
if (NumBytes == 0 && !MFI->hasCalls()) return;
int FPOffset, RAOffset;
@@ -389,7 +389,8 @@ void MipsRegisterInfo::
processFunctionBeforeFrameFinalized(MachineFunction &MF) const {
// Set the SPOffset on the FI where GP must be saved/loaded.
MachineFrameInfo *MFI = MF.getFrameInfo();
if (MFI->hasCalls()) {
bool isPIC = (MF.getTarget().getRelocationModel() == Reloc::PIC_);
if (MFI->hasCalls() && isPIC) {
MipsFunctionInfo *MipsFI = MF.getInfo<MipsFunctionInfo>();
#ifndef NDEBUG
DOUT << "processFunctionBeforeFrameFinalized\n";