This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: alignment: store_one_arg vs emit_push_insn
> > On Mon, May 12, 2003 at 02:16:49PM -0400, DJ Delorie wrote:
> > > Would it be sufficient if it just
> > > chose the minimum of the available alignment? If so, then most of the
> > > "reorg" would just be commenting the new semantics.
> >
> > Yes, that would be fine.
>
> How does this look? The tests are still running, but so far no regressions.
Doesn't that do the *maximum* of the alignments? I would think
minimum, as you said, is what you'd want instead.
paul
> 2003-05-12 DJ Delorie <dj@redhat.com>
>
> * expr.c (move_by_pieces): Honor the alignment inherent in the
> source and destination if available.
>
> Index: expr.c
> ===================================================================
> RCS file: /cvs/uberbaum/gcc/expr.c,v
> retrieving revision 1.538
> diff -p -2 -r1.538 expr.c
> *** expr.c 9 May 2003 06:37:18 -0000 1.538
> --- expr.c 12 May 2003 22:43:24 -0000
> *************** convert_modes (mode, oldmode, x, unsigne
> *** 1464,1468 ****
> used to push FROM to the stack.
>
> ! ALIGN is maximum alignment we can assume. */
>
> void
> --- 1464,1468 ----
> used to push FROM to the stack.
>
> ! ALIGN is maximum stack alignment we can assume. */
>
> void
> *************** move_by_pieces (to, from, len, align)
> *** 1477,1480 ****
> --- 1477,1485 ----
> enum machine_mode mode = VOIDmode, tmode;
> enum insn_code icode;
> +
> + if (to && MEM_ALIGN (to) > 0)
> + align = MEM_ALIGN (to);
> + if (align < MEM_ALIGN (from) && MEM_ALIGN (from) > 0)
> + align = MEM_ALIGN (from);
>
> data.offset = 0;
>