This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Turn on sibling calls for Thumb2.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Ramana Radhakrishnan <ramana dot radhakrishnan at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Richard Earnshaw <Richard dot Earnshaw at arm dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>, Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 20 May 2009 10:37:41 -0400
- Subject: Re: [Patch ARM] Turn on sibling calls for Thumb2.
- References: <001401c9d928$fd14ae40$f73e0ac0$@radhakrishnan@arm.com>
On Wed, May 20, 2009 at 09:57:22AM +0100, Ramana Radhakrishnan wrote:
> Hi,
>
> The Thumb2 port does not support sibling calls at the moment and there is no
> reason why it should not. This patch turns them on and will fix a number of
> failures for sibling calls for Thumb2 in the gcc testsuite.
>
> Ok to commit after testing on arm-none-eabi cross on qemu for cortex-a8 and
> Thumb2 ?
FYI, Mark Mitchell tested an internal patch to do this last year, and
discovered it broke early returns from functions that end in a tail
call. It was something to do with USE_RETURN_INSN, but we didn't
get to the bottom of it at the time.
I think something as simple as this will show the problem:
int bar();
int foo (int arg)
{
if (arg < 1)
return 0;
return bar ();
}
--
Daniel Jacobowitz
CodeSourcery