[llvm-commits] [PATCH] bad behavior in calculateFrameObjectOffsets

Evan Cheng evan.cheng at apple.com
Tue Jun 3 00:00:25 PDT 2008


Oops. Please commit.

Evan

On Jun 2, 2008, at 11:11 PM, Bruno Cardoso Lopes wrote:

> Using unsigned in the loop below can lead to bad stack objects access,
> one example is when
> MinCSFrameIndex = 0, the variable i doesnt go negative
> and the loop starts to access fixed objects locations (since  
> getObjectAlignment
> param is int) overwriting previous calculated stack locations. This is
> breaking callee
> saved register spill in Mips.
>
> lib/CodeGen/PrologEpilogInserter.cpp, line 365
> for (unsigned i = MaxCSFrameIndex; i >= MinCSFrameIndex; --i) {
>      unsigned Align = FFI->getObjectAlignment(i);
>
> -- 
> Bruno Cardoso Lopes ( now @ Cocos Island )
> http://www.brunocardoso.cc
>
> ++ The saddest aspect of life right now is that
> science gathers knowledge faster than society
> gathers wisdom + Isaac Asimov
> < 
> PrologEpilogInserter 
> .cpp.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list