This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
alignment: store_one_arg vs emit_push_insn
- From: DJ Delorie <dj at redhat dot com>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 9 May 2003 19:34:36 -0400
- Subject: alignment: store_one_arg vs emit_push_insn
In store_one_arg (calls.c) we see this code, computing the alignment
of a parameter:
/* Some types will require stricter alignment, which will be
provided for elsewhere in argument layout. */
parm_align = MAX (PARM_BOUNDARY, TYPE_ALIGN (TREE_TYPE (pval)));
But, in emit_push_insn where that alignment is used (it's not used
anywhere else), we see this comment:
ALIGN (in bits) is maximum alignment we can assume.
It would seem to me that the MAX should in fact be a MIN in
store_one_arg. The way the code is now, xstormy16 is trying to access
a byte-aligned object with a HImode move, and failing
(STRICT_ALIGNMENT is set).
Either that or these two functions just aren't communicating well ;-)
(Or I'm not understanding what's supposed to be happening here, of course)