+2003-05-12 DJ Delorie <dj@redhat.com>
+
+ * expr.c (move_by_pieces): Honor the alignment of TO and FROM.
+ (emit_push_insn): Don't use push when the source alignment is less
+ than the stack's push rounding.
+
2003-05-13 Zack Weinberg <zack@codesourcery.com>
* diagnostic.c (output_format): Add support for %m.
If PUSH_ROUNDING is defined and TO is NULL, emit_single_push_insn is
used to push FROM to the stack.
- ALIGN is maximum alignment we can assume. */
+ ALIGN is maximum stack alignment we can assume. */
void
move_by_pieces (to, from, len, align)
enum machine_mode mode = VOIDmode, tmode;
enum insn_code icode;
+ align = MIN (to ? MEM_ALIGN (to) : align, MEM_ALIGN (from));
+
data.offset = 0;
data.from_addr = from_addr;
if (to)
&& PUSH_ARGS
&& GET_CODE (size) == CONST_INT
&& skip == 0
+ && MEM_ALIGN (xinner) >= align
&& (MOVE_BY_PIECES_P ((unsigned) INTVAL (size) - used, align))
/* Here we avoid the case of a structure whose weak alignment
forces many pushes of a small amount of data,