This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/13557] New: GCC generates code that differs from the SPARC 64-bit System V psABI
- From: "kettenis at gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Jan 2004 21:06:59 -0000
- Subject: [Bug c/13557] New: GCC generates code that differs from the SPARC 64-bit System V psABI
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Consider the following bit of code:
struct sf { float f; };
struct sf xf;
void
foo (struct sf zf)
{
xf = zf;
}
According to the SPARC 64-bit System V psABI this particular structure should be
passed in the %f0 register. GCC passes the structure in %f1, which is what one
would expect for the following code:
float xf;
void
foo (float zf)
{
xf = zf;
}
I discovered the problem while working on GDB. I can work around the problem
there. However it means that GCC is incompatible with the Sun compilers on
Solaris, which do pass the structure in %f0.
--
Summary: GCC generates code that differs from the SPARC 64-bit
System V psABI
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kettenis at gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: sparc64-unknown-freebsd5.2
GCC host triplet: sparc64-unknown-freebsd5.2
GCC target triplet: sparc64-unknown-freebsd5.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13557