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]

ia64 abi vs variable sized data types


[ Hopefully either one or both of you are close enough to the
  correct body to get this addressed in a future revision of
  the ABI. ]

The IA-64 ABI specifies that aggregates are to be passed by
value, in registers and on the stack as position and size
dictates.  It does not, however, say anything about variable
sized aggregates, and it is between difficult and impossible
to treat them similarly.

While for C, I'm pretty sure that variable sized aggregates
are a GCC extension, they have always existed in Ada.

Up until today, gcc handled these by passing them by value
on the stack only (i.e. never any part in registers), which
worked relatively well by itself.  But I've discovered that
that fails with va_arg, since with 'void *' for va_list,
we cannot skip over the part of the varargs that came from
registers.  [E.g. http://subversions.gnu.org/cgi-bin/viewcvs/gcc/gcc/gcc/testsuite/gcc.c-torture/execute/20020307-2.c?rev=1.3&content-type=text/vnd.viewcvs-markup ]

Therefore, I propose to change gcc such that such variable
sized aggregates are passed by reference instead.  Given the
obscurity of the subject, I suspect this change affects almost
no real applications yet.

Comments?


r~


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