[LLVMdev] Controlling the stack layout

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Dec 29 15:32:49 PST 2008


Hi Bill,

Bill Wendling wrote:
>
> This might help. See how "stack protectors" is implemented here:
>
> 	lib/CodeGen/StackProtector.cpp
>
> It places a special value at a specific place on the stack. You can  
> use the same trick to put your own information on a set stack  
> position. There's more to the code than just that .cpp file. It's done  
> with intrinsics. You'll also need to check out the  
> PrologEpilogInserter.cpp code.
>
>   

Thanks. I've already looked at what stack protector does, and indeed the 
need is similar. However, I'd like to add the functionality as a new 
machine pass, so that I don't need to add new intrinsics and modify the 
llvm code base. Do you think that's possible?

Nicolas

> -bw
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>   




More information about the llvm-dev mailing list