GCC 3.4 fixes several cases in which earlier releases would not follow the MIPS calling conventions. This document describes each fix and the kind of code it will affect. In each case, GCC 3.4 will not be binary compatible with earlier releases.
Most of the fixes are related to the handling of structure and union types. In the summary below, "aggregate" refers to both structures and unions.
Note that IRIX 6 configurations used to work around B and E by providing wrappers for certain libc functions. These wrappers are not needed for 3.4 and have been removed. It should be possible to link code generated by GCC 3.4 directly with code generated by SGI's compilers.
Affected ABIs | o32 | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Endianness | little | |||||||||||||||
Conditions |
|
|||||||||||||||
Old behavior | The register was padded at the least significant end. | |||||||||||||||
New behavior | The register is padded at the most significant end. | |||||||||||||||
Example | struct s { char c[2]; }; void f (struct s x);
|
Affected ABIs | n32 and n64 | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Endianness | big | |||||||||||||||||||||||||||
Conditions |
|
|||||||||||||||||||||||||||
Old behavior | The register was padded at the most significant end. | |||||||||||||||||||||||||||
New behavior | The register is padded at the least significant end. | |||||||||||||||||||||||||||
Example | struct s { char c[2]; }; void f (struct s x);
|
Affected ABIs | n32 and n64 |
---|---|
Endianness | big |
Conditions |
|
Old behavior | The argument was passed by reference. |
New behavior | The argument is passed by value. |
Example | struct s { int i[17]; }; void f (struct s x); It would take 9 registers to hold The new behavior is to pass |
Affected ABIs | o32, o64, n32 and n64 |
---|---|
Endianness | either |
Conditions |
|
Old behavior | The structure was treated like a scalar value of the same
floating-point type. For example, a structure containing a
float field was treated in the same way as a
scalar float value. |
New behavior | There is no special treatment for such structures.
Note however that the usual n32 and n64 rules still hold:
naturally-aligned fields of type double are
passed in floating-point registers. |
Example | struct s { float f; }; void f (struct s x); GCC used to pass |
Affected ABIs | n32 and n64 | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Endianness | big | |||||||||||||||||||||||||||
Conditions |
|
|||||||||||||||||||||||||||
Old behavior | The return register was padded at the most significant end. | |||||||||||||||||||||||||||
New behavior | The return register is padded at the least significant end. | |||||||||||||||||||||||||||
Example | struct s { char c[3]; }; struct s f (); f() returns its value in
|
Affected ABIs | n32 and n64 |
---|---|
Endianness | either |
Conditions | A function returns a complex float or
double . |
Old behavior | The value was returned in $f0 and $f1 . |
New behavior | The value is returned in $f0 and $f2 . |
Example | _Complex float f (); |
Copyright (C) Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.
These pages are maintained by the GCC team. Last modified 2025-01-31.