This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*
- From: "iains at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 17 Nov 2018 11:12:40 +0000
- Subject: [Bug target/78444] Wrong prologue stack alignment for implicit dtor on x86_64-darwin*
- Auto-submitted: auto-generated
- References: <bug-78444-4@http.gcc.gnu.org/bugzilla/>
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).