------- Comment #18 from jakub at gcc dot gnu dot org 2008-12-19 14:37 ------- Created an attachment (id=16944) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16944&action=view) gcc44-pr38245.patch
On x86_64 some more work is needed, because in leaf functions parts of the outgoing_args_size space might be in red-zone, and as all the left-over stack pushes are from %rsp upwards, that still clobbers the return pointer. Perhaps we might in that case just make the red-zone smaller to make sure all of the outgoing_args_size are is above the red zone. This patch also fixes powerpc64, though in that case (or for msabi on x86_64 too) if we eliminate a call that has arguments solely in registers, still outgoing_args_size area is allocated. I guess we might want to track the size of outgoing args we really pushed for some call, not considering OUTGOING_REG_PARM_STACK_SPACE, and remember it in a new crtl-> field. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38245