Fixed bug in bad behavior in calculateFrameObjectOffsets,

the solution commited is different from the previous patch to
avoid int and unsigned comparison

llvm-svn: 51899
This commit is contained in:
Bruno Cardoso Lopes 2008-06-03 08:46:59 +00:00
parent cbb64ece8a
commit dbf310acbc

View File

@ -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.