Implements a mostly-conventional redzone for the userspace
stack. Because we have unsigned load/store offsets we continue to use a
local SP subtracted from the incoming SP but do not write it back to
memory.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
The redzone size of 128 matches some real targets, but unlike those we don't yet have to worry about exception handlers (and in any case they could use another stack). Given that, (and the overflow behavior is the same either way), is there any reason not to make the red zone larger? It seems like infinite size might be bad but not sure what a useful limit would be.
LGTM. Please add brief description comments for needsSP and needsSPWriteback.
What the size should be is a good question. I think it makes sense to leave it at 128 for now -- big enough to be useful, but not so big that we won't get some test coverage of the non-redzone case in this early phase of development. A TODO comment or so to remind us to go back and revisit this would be good. Perhaps we should start a convention of an "ABI" comment, for things we should re-evaluate before declaring a stable ABI.