Questions about PowerPC frame lowering

Mark Minich mminich87 at yahoo.com
Tue Jun 11 14:20:39 PDT 2013



Regarding PowerPC frame lowering:

IIs anyone working on making PPC frame lowering compatible with the SVR4 ABI, with regard to not accessing R1 via negative offsets? (Ref. PPCFrameLowering.cpp, FIXME: On PPC32 SVR4, FPOffset is negative and access to negative offsets of R1 is not allowed.)  I'm using LLVM on an EABI system (similar to SVR4), and my debugging tool isn't liking the fact that it's seeing accesses beyond the stack pointer into unallocated stack space (the "red zone" in the Darwin ABI).  I also need the code generated by LLVM to be safe on an OS-free embedded system that handles interrupts on the same stack as the "user" code, and on such a system it's never safe to access beyond the stack pointer... you have to advance the stack pointer before making any spills (i.e. there's no red zone).


I'm interested in fixing that FIXME, but I have a few questions about frame lowering in general & how it fits into the bigger picture before I get started making any changes.  I know it's possible to write frame claiming assembly that's common + compatible (with no loss of efficiency -- It's all in the order in which you do essentially the same operations) between both Darwin and SVR4 (and EABI), I just don't know how to rewrite PPCFrameLowering.cpp to make it emit such compatible code and would like some help doing so.

Thanks,
-Mark Minich
 mminich87 -at- yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130611/08024a1f/attachment.html>


More information about the llvm-commits mailing list