This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PING: PATCH: PR middle-end/37843:[4.4 Regression] unaligned stack in maindue to tail call optimizatiP
On Wed, Nov 26, 2008 at 10:14:25AM -0800, Andrew Pinski wrote:
> On Wed, Nov 26, 2008 at 10:02 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> > On Wed, Nov 26, 2008 at 9:34 AM, Jack Howarth <howarth@bromo.med.uc.edu> wrote:
> >> On Wed, Nov 26, 2008 at 06:50:08AM -0800, H.J. Lu wrote:
> >>>
> >>> Darwin doesn't support sibcall. I am checking it to mark them Linux
> >>> only.
> >>>
> >>>
> >>> H.J.
> >>
> >> H.J.,
> >> Could you expand on that comment? Is the problem with sibcall on
> >> Darwin that FSF gcc doesn't have the proper darwin specific changes
> >> to implement sibcall or is the problem that the darwin assembler or
> >> linker from Xcode doesn't properly support sibcall? If the problem is
> >> the latter, we could submit a radar bug report asking for sibcall
> >> support to be implemented in the cctools of Snow Leopard.
> >> Jack
> >
> > static bool
> > ix86_function_ok_for_sibcall (tree decl, tree exp)
> > {
> > tree func;
> > rtx a, b;
> >
> > /* If we are generating position-independent code, we cannot sibcall
> > optimize any indirect call, or a direct call to a global function,
> > as the PLT requires %ebx be live. */
> > if (!TARGET_64BIT && flag_pic && (!decl || !targetm.binds_local_p (decl)))
> > return false;
> >
> > Darwin returns false.
> >
>
> Because darwin is always pic though binds_local_p should return true ...
>
> -- Pinski
Andrew,
Is that true even if the code were compiled with -fno-PIC on darwin?
Jack