This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/16446] Irix calling conventions for complex numbers
- From: "rsandifo at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2004 06:04:21 -0000
- Subject: [Bug target/16446] Irix calling conventions for complex numbers
- References: <20040709031204.16446.billingd@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From rsandifo at redhat dot com 2004-07-29 06:04 -------
Subject: Re: Irix calling conventions for complex numbers
"billingd at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> ------- Additional Comments From billingd at gcc dot gnu dot org 2004-07-28 23:59 -------
> Output from irix c99 foo.c test program
>
> 0 1
> 0 2
> 0 3
> 0 4
> 0 5
> 0 6
> 0 7
> 0 1.87053e-29
> 0 1
> 0 2
> 0 3
> 0 4
> 0 5
> 0 6
> 0 7
> 0 1.87053e-29
A bug! I thought so! The problem is that the real and imaginary
parts of complex float varargs are being passed in two separate GPRs:
+------+------+
|......| real | GPR i
+------+------+
|......| imag | GPR i+1
+------+------+
but stack varargs are passed as follows:
+------+------+
| real | imag | Stack word i
+------+------+
|......|......| Stack word i+1
+------+------+
What's more, it looks like MIPSpro's va_arg() expects neither of these,
and instead wants:
+------+------+
| real | imag | Stack word i
+------+------+
(i.e. with no word of padding).
Are you in a position to send this to SGI? At the moment, it doesn't
look like we can hope for compatibility as far as complex floats go.
Complex doubles should be easy though.
> PS: Richard, if you keep apologising for delays I will want my money back.
;) Point taken.
Richard
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16446