alignment: store_one_arg vs emit_push_insn
DJ Delorie
dj@redhat.com
Mon May 12 18:19:00 GMT 2003
> Clearly this is all confused. There's no need to glean the value
> of the argument from a passed in "align" parameter. If the value
> is in memory then MEM_ALIGN will contain the proper alignment.
> True, MEM_ALIGN did not exist when this routine was written, but
> that doesn't mean we can't clean this up now.
So, what would a minimal fix be? Ignore align and read MEM_ALIGN from
the parameters?
> I think both move_by_pieces and emit_push_insn should be reorged
> and clarified that the alignment parameter applies only to the
> stack (i.e. to==NULL in the move_by_pieces case).
move_by_pieces is fairly naive about mem-mem transfers. It doesn't
look like it would be able to take advantage of knowing both
alignments without a large change. 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.
More information about the Gcc
mailing list