Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Jim Blandy <jimb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: RFA: rs6000: remove some uses of DEPRECATED_REGISTER_BYTE
Date: Tue, 01 Jun 2004 22:39:00 -0000	[thread overview]
Message-ID: <20040601153857.23c1aa11@saguaro> (raw)
In-Reply-To: <vt2k6z5h1pp.fsf@zenia.home>

On 21 May 2004 17:09:22 -0500
Jim Blandy <jimb@redhat.com> wrote:

> Kevin Buettner <kevinb@redhat.com> writes:
> 
> > On 20 May 2004 19:24:51 -0500
> > Jim Blandy <jimb@redhat.com> wrote:
> > 
> > > 2004-05-20  Jim Blandy  <jimb@redhat.com>
> > > 
> > > 	* rs6000-tdep.c (rs6000_push_dummy_call): Remove uses of
> > > 	DEPRECATED_REGISTER_BYTE and deprecated_registers.
> > 
> > Would you mind revising the patch to call convert_typed_floating()
> > for the floating point cases?  I think that will obviate the need
> > for some of the memset/memcpy calls.  (See ppc_sysv_abi_push_dummy_call()
> > in ppc-sysv-tdep.c.)
> > 
> > It looks okay otherwise...
> 
> So, wait, does this mean that the existing code like this is wrong?
> 
>       if (TYPE_CODE (type) == TYPE_CODE_FLT)
> 	{
> 
> 	  /* Floating point arguments are passed in fpr's, as well as gpr's.
> 	     There are 13 fpr's reserved for passing parameters. At this point
> 	     there is no way we would run out of them.  */
> 
> 	  if (len > 8)
> 	    printf_unfiltered ("Fatal Error: a floating point parameter "
>                                "#%d with a size > 8 is found!\n", argno);
> 
> 	  memcpy (&deprecated_registers[DEPRECATED_REGISTER_BYTE
>                                         (tdep->ppc_fp0_regnum + 1 + f_argno)],
> 		  VALUE_CONTENTS (arg),
> 		  len);
> 	  ++f_argno;
> 	}
> 
> This code takes a floating-point value, of whatever size, and just
> copies it into the left end of the floating-point register.  My PPC
> book says "Every instruction that interprets the contents of an FPR as
> a floating-point value uses the floating-point double format for this
> interpretation."
> 
> Calls to unprototyped functions would promote arguments to double
> anyway, so this isn't a big deal there, but it seems bogus for
> prototyped functions.

Sorry for taking so long on this one...

I'm okaying your original patch since it's a faithful conversion of
deprecated to non-deprecated code.  We can revisit the matter of
whether convert_typed_floating() should be used or not at a later
date.

Kevin


      reply	other threads:[~2004-06-01 22:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-21  0:29 Jim Blandy
2004-05-21 20:16 ` Kevin Buettner
2004-05-21 22:09   ` Jim Blandy
2004-06-01 22:39     ` Kevin Buettner [this message]

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=20040601153857.23c1aa11@saguaro \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=jimb@redhat.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