aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/PrologEpilogInserter.cpp
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-06-03 08:46:59 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2008-06-03 08:46:59 +0000
commita8c63f0fc9feb48f17d702a907f065959c41e337 (patch)
tree52408dc574be0c4420f12ca3a03035c95c28da83 /lib/CodeGen/PrologEpilogInserter.cpp
parentf73ff3aaf64627fb71753032904ee3ab2a7add28 (diff)
downloadexternal_llvm-a8c63f0fc9feb48f17d702a907f065959c41e337.zip
external_llvm-a8c63f0fc9feb48f17d702a907f065959c41e337.tar.gz
external_llvm-a8c63f0fc9feb48f17d702a907f065959c41e337.tar.bz2
Fixed bug in bad behavior in calculateFrameObjectOffsets,
the solution commited is different from the previous patch to avoid int and unsigned comparison git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51899 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/PrologEpilogInserter.cpp')
-rw-r--r--lib/CodeGen/PrologEpilogInserter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/PrologEpilogInserter.cpp b/lib/CodeGen/PrologEpilogInserter.cpp
index fda08bc..c52da32 100644
--- a/lib/CodeGen/PrologEpilogInserter.cpp
+++ b/lib/CodeGen/PrologEpilogInserter.cpp
@@ -362,7 +362,8 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
FFI->setObjectOffset(i, -Offset); // Set the computed offset
}
} else {
- for (unsigned i = MaxCSFrameIndex; i >= MinCSFrameIndex; --i) {
+ int MaxCSFI = MaxCSFrameIndex, MinCSFI = MinCSFrameIndex;
+ for (int i = MaxCSFI; i >= MinCSFI ; --i) {
unsigned Align = FFI->getObjectAlignment(i);
// If the alignment of this object is greater than that of the stack, then
// increase the stack alignment to match.