This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Add a C testcase for an ARM stack alignment bug.
- From: Janis Johnson <janis187 at us dot ibm dot com>
- To: Kazu Hirata <kazu at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, andrew at codesourcery dot com
- Date: Thu, 19 Feb 2009 13:21:22 -0800
- Subject: Re: [patch] Add a C testcase for an ARM stack alignment bug.
- References: <20090219193338.1B6AB6F6234D@daisy.codesourcery.com>
- Reply-to: janis187 at us dot ibm dot com
On Thu, 2009-02-19 at 11:33 -0800, Kazu Hirata wrote:
> Hi,
>
> Attached is a patch to add a C testcase for an ARM stack alignment bug.
>
> Andrew committed the following to fix a Fortran bug a while ago.
>
> 2008-07-30 Andrew Jenner <andrew@codesourcery.com>
>
> * config/arm/arm.c (arm_compute_static_chain_stack_bytes): New
> function.
> (arm_compute_initial_elimination_offset): Use it.
> (arm_compute_save_reg_mask): Include static chain save slot when
> calculating alignment.
> (arm_get_frame_offsets): Ditto.
> (thumb1_compute_save_reg_mask): Ensure we have a low register saved
> that we can use to decrement the stack when the stack decrement
> could be too big for an immediate value in a single insn.
> (thumb1_expand_prologue): Avoid using r12 for stack decrement.
>
> It turns out that there is a C testcase that would be broken without
> his patch.
>
> Since C is presumably tested more often than Fortran, I'd like to
> propose that the attached testcase be included in the C testsuite.
>
> Tested on arm-none-linux-gnueabi. OK to apply?
>
> Kazu Hirata
>
> 2009-02-19 Kazu Hirata <kazu@codesourcery.com>
>
> * gcc.c-torture/execute/20090219-1.c: New.
OK.
Janis