[patch] Improve stack checking on PowerPC

Eric Botcazou ebotcazou@adacore.com
Sun Dec 13 23:43:00 GMT 2009


Stack checking now works reasonably well on the mainline, however it is a 
little inefficient on the PowerPC.  The reason is that it is implemented (on 
OSes with MM) by means of probes, i.e. by storing 0 at specified addresses.

Now the PowerPC doesn't feature a register hardwired to 0 like the SPARC so 0 
needs to be loaded each time, which is useless since the value being stored 
doesn't matter, only the store does.

Hence the attached patch, tested on powerpc-linux-gnu, OK for mainline?


2009-12-13  Eric Botcazou  <ebotcazou@adacore.com>

	* config/rs6000/rs6000.md (UNSPEC_PROBE_STACK): New constant.
	(probe_stack): New insn.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ppc_stack_probe.diff
Type: text/x-diff
Size: 791 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091213/3c31119f/attachment.bin>


More information about the Gcc-patches mailing list