From 1d84f0a461d13a89de9d9424535b3a0079aa14eb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 16 Dec 2002 17:42:40 +0000 Subject: Keep the stack frame aligned. llvm-svn: 5081 --- llvm/lib/CodeGen/RegAllocSimple.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib') diff --git a/llvm/lib/CodeGen/RegAllocSimple.cpp b/llvm/lib/CodeGen/RegAllocSimple.cpp index 9ed6ad98953..925915ee771 100644 --- a/llvm/lib/CodeGen/RegAllocSimple.cpp +++ b/llvm/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); -- cgit v1.2.3