From 7310a2da1cb6abdaf82617b973855fa6131ae9dd Mon Sep 17 00:00:00 2001 From: Stefan Schulze Frielinghaus Date: Wed, 29 Oct 2008 19:33:45 +0000 Subject: configure.ac [spu-*-*]: Do not set skipdirs. ChangeLog: 2008-10-29 Stefan Schulze Frielinghaus * configure.ac [spu-*-*]: Do not set skipdirs. * configure: Re-generate. gcc/ChangeLog: 2008-10-29 Stefan Schulze Frielinghaus * config/spu/spu.h (FRAME_GROWS_DOWNWARD): Define. (INITIAL_FRAME_POINTER_OFFSET): Remove. * config/spu/spu.c (spu_initial_elimination_offset): Calculate new offset if eliminating soft frame pointer. * config/spu/spu.md (stack_protect_set, stack_protect_test) (stack_protect_test_si): Add initial machine description for Stack Smashing Protector From-SVN: r141437 --- gcc/config/spu/spu.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'gcc/config/spu/spu.c') diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index e3781d5..cd7f6ed 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -1759,8 +1759,8 @@ direct_return (void) The stack frame looks like this: +-------------+ | incoming | - AP | args | - +-------------+ + | args | + AP -> +-------------+ | $lr save | +-------------+ prev SP | back chain | @@ -1770,10 +1770,10 @@ direct_return (void) +-------------+ | ... | | saved regs | spu_saved_regs_size() bytes - +-------------+ + FP -> +-------------+ | ... | - FP | vars | get_frame_size() bytes - +-------------+ + | vars | get_frame_size() bytes + HFP -> +-------------+ | ... | | outgoing | | args | crtl->outgoing_args_size bytes @@ -1781,8 +1781,8 @@ direct_return (void) | $lr of next | | frame | +-------------+ - SP | back chain | - +-------------+ + | back chain | + SP -> +-------------+ */ void @@ -3671,15 +3671,16 @@ spu_initial_elimination_offset (int from, int to) || get_frame_size () || saved_regs_size) sp_offset = STACK_POINTER_OFFSET; if (from == FRAME_POINTER_REGNUM && to == STACK_POINTER_REGNUM) - return (sp_offset + crtl->outgoing_args_size); + return get_frame_size () + crtl->outgoing_args_size + sp_offset; else if (from == FRAME_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) - return 0; + return get_frame_size (); else if (from == ARG_POINTER_REGNUM && to == STACK_POINTER_REGNUM) return sp_offset + crtl->outgoing_args_size + get_frame_size () + saved_regs_size + STACK_POINTER_OFFSET; else if (from == ARG_POINTER_REGNUM && to == HARD_FRAME_POINTER_REGNUM) return get_frame_size () + saved_regs_size + sp_offset; - return 0; + else + gcc_unreachable (); } rtx -- cgit v1.1