This is the mail archive of the gcc-bugs@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]

[Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78444

--- Comment #14 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Uroš Bizjak from comment #13)
> (In reply to Iain Sandoe from comment #12)
> > +  /* If we're profiling, we don't have a leaf.  */
> > +  gcc_assert (!crtl->is_leaf || !crtl->profile);
> >    stack_alignment_needed = crtl->stack_alignment_needed / BITS_PER_UNIT;
> >    preferred_alignment = crtl->preferred_stack_boundary / BITS_PER_UNIT;
> 
> This assert looks too risky to me, considering how many approaches to
> profiling generic x86 has.

It wasn't intended to be left in place - I was just checking that it was a safe
assumption for Darwin that profile implied !leaf.

> I think that adding
> 
> if (TARGET_MACHO && crtl->profile)
>   {
>     crtl->preferred_stack_boundary = 128;
>     crtl->stack_alignment_needed = 128;
>   }
> 
> should be the fail-safe solutiom.

or I could add "|| (TARGET_MACHO && crtl->profile)" to the existing list (so
that it doesn't fire for MS).

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