This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 stack missalignment on main
- To: Branko Čibej <brane at xbc dot nu>
- Subject: Re: i386 stack missalignment on main
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 1 Aug 2001 20:06:39 +0200
- Cc: Jan Hubicka <jh at suse dot cz>, gcc at gcc dot gnu dot org
- References: <20010730141652.E5820@atrey.karlin.mff.cuni.cz> <20010730093723.C3014@redhat.com> <20010730190134.C473@atrey.karlin.mff.cuni.cz> <20010730222354.R473@atrey.karlin.mff.cuni.cz> <3B672FDF.2060800@xbc.nu>
> Um, this is a shot in the dark, but IMHO ...
>
> Jan Hubicka wrote:
>
> >+ void
> >+ ix86_output_main_function_alignment_hack (file, size)
> >+ FILE *file;
> >+ int size ATTRIBUTE_UNUSED;
> >+ {
> >+ rtx label;
> >+ char buf[256];
> >+ /* Check that we see main function with maximally 8 bytes of arguments.
> >
> ... either the 8 in this comment is wrong, ...
Oops, yes, it should be 12. I will fix that.
Honza
>
> >
> >+ if so, emit the hack to align stack for runtimes, where this constraint
> >+ is broken. */
> >+ if (strcmp (cfun->name, "main"))
> >+ return;
> >+ if (cfun->pops_args || cfun->args_size > 12)
> >
> ... or the 12 in this condition is.
>
> --
> Brane Čibej
> home: <brane@xbc.nu> http://www.xbc.nu/brane/
> work: <branko.cibej@hermes.si> http://www.hermes-softlab.com/
> ACM : <brane@acm.org> http://www.acm.org/
>
>