diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-07-15 02:03:36 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-07-15 02:03:36 +0000 |
commit | b27cb55923024907f7dba43d24ec37408ef1f574 (patch) | |
tree | c77fda314cd514d17598392ceccd52f41e17465f /lib/Target/Mips/MipsRegisterInfo.cpp | |
parent | f0d286b77fe40017192b527e5cc5d87974093d54 (diff) |
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
Diffstat (limited to 'lib/Target/Mips/MipsRegisterInfo.cpp')
-rw-r--r-- | lib/Target/Mips/MipsRegisterInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/Mips/MipsRegisterInfo.cpp b/lib/Target/Mips/MipsRegisterInfo.cpp index cd42abd300..2c92060be9 100644 --- a/lib/Target/Mips/MipsRegisterInfo.cpp +++ b/lib/Target/Mips/MipsRegisterInfo.cpp @@ -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"; |