This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]