Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [rfa] Add e500 function call support to PPC
Date: Sun, 09 Mar 2003 01:00:00 -0000	[thread overview]
Message-ID: <1030309005725.ZM21224@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "[rfa] Add e500 function call support to PPC" (Mar  8,  2:11pm)

On Mar 8,  2:11pm, Andrew Cagney wrote:

> This adds support for the e500's function call convention to the PPC 
> (ppc-sysv-tdep.c to be exact).
> 
> The e500 passes everything in GPRs (which are extended to 64 bits).
> 
[...]
> -      if (TYPE_CODE (type) == TYPE_CODE_FLT)
> +      if (TYPE_CODE (type) == TYPE_CODE_FLT
> +          && arch_info->mach != bfd_mach_ppc_e500)

This construct bothers me.  If it occurred only once, it might not
bother me so much, but (arch_info->mach != bfd_mach_ppc_e500) appears
far too often in the code for me to be comfortable with it.  Suppose
we have another core with a similar property (of passing everything
in GPRs).  If this happens, we'll end up with a proliferation of
additional checks for all of these different cores and things will
become quite unreadable.  Please introduce a predicate into which
we can put this test and perhaps others as they arise.  Then, only
the predicate will need to be modified.

Kevin


  reply	other threads:[~2003-03-09  1:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-08 19:11 Andrew Cagney
2003-03-09  1:00 ` Kevin Buettner [this message]
2003-03-10 15:11   ` Andrew Cagney
2003-03-10 17:54     ` Kevin Buettner
2003-03-10 19:56       ` Andrew Cagney
2003-03-10 21:47         ` Kevin Buettner
2003-03-17 16:59           ` Andrew Cagney
2003-03-17 17:45             ` Kevin Buettner
2003-03-17 18:28               ` Andrew Cagney

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=1030309005725.ZM21224@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.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