This is the mail archive of the
mailing list for the GCC project.
Re: MIPS 3.4.0 ABI and one-sized arrays
Eric Botcazou wrote:
Strictly speaking, I don't think so. Take a look at the second line in the
document, I see no mention of arrays.
The C language, and related languages, have no mechanism for passing
arrays as arguments or returning them as return values. In both cases,
they decay to simple pointers. Most gcc developers have C or C++ as
their main language. Thus, when people talk about aggregate parameters
and return values, they sometimes assume that only structs and unions
are affected, because they do not know of any way for arrays to be
affected. The intent here is to cover all aggregate types, including
You can find the SGI published ABI here:
Or just visit docs.sgi.com, click on Irix6 Developer, and then MIPSPro
N32 ABI Handbook.
On page 7, it says "Structs, unions, or other composite types ...". A
little later it says "Array fields of structs are passed like unions.
Array parameters are passed by reference (unless the relevant language
standard requires otherwise)." So it looks like we need two different
mechanisms for passing arrays, depending on whether they are structure
fields or standalone objects.
Since we can't write C/C++ testcases that have array parameters, it
isn't possible for C/C++ developers to have gotten this part of the ABI
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com