This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch ARM] Turn on sibling calls for Thumb2.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]