From 1b5076887e32f9a16a1f65f3ce9abf11c31abcd7 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 6 Oct 2006 14:29:47 +0000 Subject: [PATCH] fix the stack alignment git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30766 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMRegisterInfo.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.34.1