summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocSimple.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-12-16 17:42:40 +0000
committerChris Lattner <sabre@nondot.org>2002-12-16 17:42:40 +0000
commit1d84f0a461d13a89de9d9424535b3a0079aa14eb (patch)
tree1c324b93453b06f935429f6a419d01d3b727a4a4 /llvm/lib/CodeGen/RegAllocSimple.cpp
parentb74c150efce38b25c4689dc529230dd7046f1b1c (diff)
downloadbcm5719-llvm-1d84f0a461d13a89de9d9424535b3a0079aa14eb.tar.gz
bcm5719-llvm-1d84f0a461d13a89de9d9424535b3a0079aa14eb.zip
Keep the stack frame aligned.
llvm-svn: 5081
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocSimple.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocSimple.cpp4
1 files changed, 4 insertions, 0 deletions
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);
OpenPOWER on IntegriCloud