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

On Sun, Oct 05, 1997 at 07:14:09PM -0400, Weiwen Liu wrote:
> On Wed, 1 Oct 1997, Richard Henderson wrote:
> 
> > 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.
[...]
> On an alpha-dec-osf4.0, this patch correctly compiles the following test
> program with F=char, short, int, long, float, double:

No good.

(1) It is still treating complex float as an 8-byte struct not two 
    _separate_ float arguments.  I sent you f2a and f2b so that you
    could verify that their arguments wound up in the same place, but

    f2b:
	lds $f10,16($30)
	lds $f11,20($30)

    f2a:
	lds $f10,16($30)
	lds $f11,24($30)

(2) f1, the one with odd numbered arguments, is _completely_ wrong:

    f1:
	lda $30,-16($30)
	.prologue 0
	sts $f21,8($30)
	lds $f10,12($30)

Did we write to 12($30), which is below the vfp?  No.  Your program
happened to run because of this bit from main:

	sts $f3,-4($30)

which is a big no-no.   No writes may be made below $sp.  You take a
signal after that instruction and your data will be corrupted. 


r~

  reply	other threads:[~1997-10-05 18:28 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
1997-10-02 10:46     ` Richard Henderson
1997-10-05 16:16   ` Weiwen Liu
1997-10-05 18:28     ` Richard Henderson [this message]
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=19971005182519.53305@dot.cygnus.com \
    --to=rth@cygnus.com \
    --cc=egcs@cygnus.com \
    --cc=liu@hepvms.physics.yale.edu \
    /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).