From: Kevin Buettner <kevinb@redhat.com>
To: Elena Zannoni <ezannoni@redhat.com>, Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] PPC ABI compliance fix
Date: Fri, 22 Mar 2002 12:37:00 -0000 [thread overview]
Message-ID: <1020322203728.ZM27746@localhost.localdomain> (raw)
In-Reply-To: Elena Zannoni <ezannoni@redhat.com> "Re: [RFA] PPC ABI compliance fix" (Mar 22, 3:06pm)
On Mar 22, 3:06pm, Elena Zannoni wrote:
> > > +ppc_sysv_abi_use_struct_convention (int gcc_p, struct type *value_type)
> > > +{
> > > + return (TYPE_LENGTH (value_type) > 8);
> > > +}
> > > +
> > > /* round2 rounds x up to the nearest multiple of s assuming that s is a
> > > power of 2 */
> >
> > Should this live in rs6000-tdep.c?
>
> Yes, There is a FIXME about that in the file. I am not sure why
> sysv_push_arguments is in that file as well. I didn't want to change
> it in case there was some real technical problem.
>
> Maybe Kevin knows why?
There's no real technical problem. I wrote
ppc_sysv_abi_push_arguments() for Linux, so it ended up in the Linux
file. I don't think there would be any real problem with moving it to
rs6000-tdep.c, but I would prefer not to since rs6000-tdep.c deals
more with the PowerOpen ABI (in addition to generic arch considerations).
In my opinion, they probably belong in a ppc-sysv-abi-tdep.c file.
But at the moment, there's no real incentive for creating this file
(aside from making things somewhat more tidy) because ppc-linux-tdep.c
needs to be a part of all GDB builds that target Power / PowerPC.
I've been thinking about Andrew's comments from a week or so ago in
the discussion regarding x86-64-linux-tdep.c. As Andrew noted at the
time, the gdbarch machinery that we now have isn't set up to do
inheritance, and so as a consequence, we end up with the situation
that we have with the ppc*-tdep.c files in which you need include
linux support in a native build for AIX. It would be nice if we could
restructure things so that there'd be a generic ppc-tdep.c file which
knows nothing about ABIs or OS considerations. Under that, you'd have
ppc-poweropen-abi.c (or whatever IBM is calling their ABI these days)
and ppc-sysv-abi-tdep.c and perhaps even ppc-sysv-eabi-tdep.c. Below
that you'd have the various OS specific tdep files. Unfortunately,
we can't do it yet because the gdbarch machinery won't allow it.
Kevin
next prev parent reply other threads:[~2002-03-22 20:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-22 11:28 Elena Zannoni
2002-03-22 11:52 ` Andrew Cagney
2002-03-22 12:06 ` Elena Zannoni
2002-03-22 12:37 ` Kevin Buettner [this message]
2002-03-22 12:47 ` Kevin Buettner
2002-03-22 13:41 ` Elena Zannoni
2002-03-22 14:01 ` Elena Zannoni
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=1020322203728.ZM27746@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@cygnus.com \
--cc=ezannoni@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