GCC 3.4 fixes several cases in which earlier releases would not follow the SPARC 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 small structure and union types in 64-bit mode.
Affected ABI | 64-bit |
---|---|
Conditions |
|
Old behavior | The register was odd-numbered. |
New behavior | The register is even-numbered. |
Example | struct s { float f; }; void g (struct s x);
|
Affected ABI | 64-bit | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Conditions |
|
||||||||||||||||||
Old behavior | The last used register was padded at the most significant end. | ||||||||||||||||||
New behavior | The last used register is padded at the least significant end. | ||||||||||||||||||
Example | struct s { float f; int i; int j; }; void g (struct s x);
|
Affected ABI | 64-bit | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
Conditions |
|
|||||||||
Old behavior | The register was padded at the most significant end. | |||||||||
New behavior | The register is padded at the least significant end. | |||||||||
Example | union u { int i; float f; }; void g (union u x);
|
Affected ABI | 64-bit |
---|---|
Conditions |
|
Old behavior | The complex floating-point field was passed on the stack. |
New behavior | The complex floating-point field is passed in registers. |
Example | struct s { _Complex float cf; }; void g (struct s x1, struct s x2, struct s x3, struct s x4, struct s x5, struct s x6, struct s x7);
|
Affected ABI | 64-bit |
---|---|
Conditions |
|
Old behavior | The floating-point field was passed on the stack. |
New behavior | The floating-point field is passed in registers. |
Example | struct s { struct { double d; } ns; }; void g (struct s x1, struct s x2, struct s x3, struct s x4, struct s x5, struct s x6, struct s x7);
|
Affected ABI | 32-bit | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Conditions | A complex floating-point value is passed to or returned from a function. | ||||||||||||
Old behavior | The complex floating-point value was passed or returned according
to the following table:
|
||||||||||||
New behavior | The complex floating-point value is passed or returned according
to the following table:
|
||||||||||||
Example | _Complex float g (void); The return value is returned in floating-point registers |
Affected ABI | 64-bit |
---|---|
Conditions | A TI mode integral value is passed to a function. |
Old behavior | The TI mode integral value was not aligned on a 16-byte boundary in the parameter array. |
New behavior | The TI mode integral value is aligned on a 16-byte boundary in the parameter array. |
Example | typedef int TItype __attribute__ ((mode (TI))); void g (int x1, TItype x2);
|
Affected ABI | 32-bit |
---|---|
Conditions | A _Complex long long value is passed to a function. |
Old behavior | The _Complex long long value was passed in registers. |
New behavior | The _Complex long long value is passed in memory. |
Example | void g (_Complex long long x1);
|
Affected ABI | 64-bit |
---|---|
Conditions | A complex integral value is passed in registers. |
Old behavior | Two consecutive registers were reserved, regardless of the size of the complex integral value. |
New behavior | Only one register is reserved if the complex integral value can fit in a single register. |
Example | void g (_Complex int x1, _Complex int x2);
|
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 2022-10-26.