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]

Re: complex support on alpha


On Wed, 1 Oct 1997, Richard Henderson wrote:

> > The following patch  will calculate number of registers for
> > complex arguments correctly and compile complex-5.c correctly.
> 
> Well, it is enough to compile those examples properly, but it is
> not completely correct.  The problem is that complex numbers should
> be treated as two distinct arguments on Alpha, which affects padding
> of the arguments passed on the stack.
> 
> Have a look at the appended samples.  Note the lossage in the 
> handling of C in f1.  And the code generated for f2a and f2b
> should be identical wrt g+h/d.
> 
> It was a this point I got stuck myself.
> 
> 
> 
> r~
> 
> 
> 
> typedef __complex__ float FC;
> 
> FC f1(int odd, FC a, FC b, FC c)
> {
>   return a + b + c;
> }
> 
> FC f2a(float a, float b, float c, float d, float e, float f, float g, float h)
> {
>   return (a + c + e + g) + 1.0fi * (b + d + f + h);
> }
> 
> FC f2b(FC a, FC b, FC c, FC d)
> {
>   return a + b + c + d;
> }
> 

I am working on this.

I have a question concerning f1:
How do we pass C of f1?  Both real and imagine part on stack, or real on
register and imagine on stack?

Weiwen



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