[PATCH] sh64: Initial checkstack port
This provides a port of checkstack for sh64 for the simple frames allocated as an immediate with a single instruction. Stack frame creation on sh64 happens in a couple of different ways, when the frame size is less than 511 bytes an addi or addi.l is typically used, generally along the lines of something like: addi{,.l} r15, -IMM_FRAME_SIZE, r15 For larger frames, this ends up getting split up into a movi/sub pair: movi IMM_FRAME_SIZE, rX sub r15, rX, r15 We currently don't handle the split pair case, as basically any register can be used, and there is no easy way to determine what happens without scanning the prologue multiple times and using some sort of register cache (we already do something similar for the sh64 stack unwinder, but it would be preferable not to do this in perl..). This does have limited usefulness in that we are not easily able to check for huge frames without manual inspection, but this is still useful enough in the general case to be worth doing for the addi/addi.l case as long as people are aware of this caveat. It may be worth revisiting at a later point to try and catch the larger users though. Signed-off-by: Paul Mundt <lethal@linux-sh.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing
Please register or sign in to comment