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]

[RFC] ABI compatibility with vendor compiler on SPARC/Solaris


Hi,

Contrary to the 64-bit ABI, GCC 3.x correctly implements the 32-bit ABI on 
SPARC, as defined by the SCD 2.4.1.  Running the compat testsuite against 
the vendor compiler (Sun CC v5.5) shows nevertheless some incompatibilities 
between them, which all pertain to the ISO C99 complex floating-point types.

Here are the 32-bit ABI conventions implemented by Sun CC:

                           argument     return value
float                      int. reg.      FP reg.
double                     int. reg.      FP reg.
long double                 memory        memory
_Complex float              memory        FP reg.
_Complex double             memory        FP reg.
_Complex long double        memory        FP reg.


And the ones implemented by GCC:

                           argument     return value
float                      int. reg.      FP reg.
double                     int. reg.      FP reg.
long double                 memory        memory
_Complex float             int. reg.      int. reg.
_Complex double            int. reg.      int. reg.
_Complex long double        memory        memory


The first 3 lines are imposed by the original psABI.  But even the SCD 2.4.1, 
which was released in 1999, doesn't say anything about the last 3 lines.


Should GCC adopt the conventions of the vendor compiler as of GCC 3.4?  They 
are technically superior, because you can't move a value between integer 
regs and FP regs on SPARC without spilling it to memory.

-- 
Eric Botcazou


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