public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Weiwen Liu <liu@hepvms.physics.yale.edu>
To: rth@cygnus.com
Cc: egcs@cygnus.com
Subject: Re: complex support on alpha
Date: Thu, 02 Oct 1997 09:22:00 -0000	[thread overview]
Message-ID: <Pine.OSF.3.96.971002121841.30447A-100000@hepunix1.physics.yale.edu> (raw)
In-Reply-To: <199710020532.WAA16123@dot.cygnus.com>

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


  reply	other threads:[~1997-10-02  9:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-01 21:03 Weiwen Liu
1997-10-01 22:34 ` Richard Henderson
1997-10-02  9:22   ` Weiwen Liu [this message]
1997-10-02 10:46     ` Richard Henderson
1997-10-05 16:16   ` Weiwen Liu
1997-10-05 18:28     ` Richard Henderson
1997-10-02 20:35 ` Jim Wilson
1997-10-04 14:33   ` Kamil Iskra
1997-10-04 18:29     ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.OSF.3.96.971002121841.30447A-100000@hepunix1.physics.yale.edu \
    --to=liu@hepvms.physics.yale.edu \
    --cc=egcs@cygnus.com \
    --cc=rth@cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).