From: Rafael Espindola Date: Fri, 6 Oct 2006 14:29:47 +0000 (+0000) Subject: fix the stack alignment X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=1b5076887e32f9a16a1f65f3ce9abf11c31abcd7;p=oota-llvm.git fix the stack alignment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30766 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMRegisterInfo.cpp b/lib/Target/ARM/ARMRegisterInfo.cpp index 1b0f3fd8e54..fd04f5aecf2 100644 --- a/lib/Target/ARM/ARMRegisterInfo.cpp +++ b/lib/Target/ARM/ARMRegisterInfo.cpp @@ -139,6 +139,9 @@ void ARMRegisterInfo::emitPrologue(MachineFunction &MF) const { NumBytes += MFI->getMaxCallFrameSize(); } + // Align to 8 bytes + NumBytes = ((NumBytes + 7) / 8) * 8; + MFI->setStackSize(NumBytes); //sub sp, sp, #NumBytes