From: Chris Lattner Date: Mon, 16 Dec 2002 17:42:40 +0000 (+0000) Subject: Keep the stack frame aligned. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=69c198863db1daccb2c80c2122c335a169d6b573;p=oota-llvm.git Keep the stack frame aligned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5081 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegAllocSimple.cpp b/lib/CodeGen/RegAllocSimple.cpp index 9ed6ad98953..925915ee771 100644 --- a/lib/CodeGen/RegAllocSimple.cpp +++ b/lib/CodeGen/RegAllocSimple.cpp @@ -324,6 +324,10 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) { MBB != MBBe; ++MBB) AllocateBasicBlock(*MBB); + // Round stack allocation up to a nice alignment to keep the stack aligned + // FIXME: This is X86 specific! Move to frame manager + NumBytesAllocated = (NumBytesAllocated + 3) & ~3; + // Add prologue to the function... RegInfo->emitPrologue(Fn, NumBytesAllocated);