From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@ges.redhat.com>,
Kevin Buettner <kevinb@redhat.com>
Cc: Michael Snyder <msnyder@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [RFA] mips_push_arguments(): Make O64 ABI test explicit
Date: Thu, 01 Aug 2002 15:47:00 -0000 [thread overview]
Message-ID: <1020801224710.ZM30368@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@ges.redhat.com> "Re: [RFA] mips_push_arguments(): Make O64 ABI test explicit" (Aug 1, 6:27pm)
On Aug 1, 6:27pm, Andrew Cagney wrote:
> > That being the case, more than just the comment
> > will need to change. (IMO, of course.)
>
> In what way? GDB was trying to implement things according to the ABI
> (unless someone snuck in a change or the code suffered bit rot).
The short answer: I've probably managed to bit rot it with one of my
other (as of yet unapplied) patches since it changes MIPS_SAVED_REGSIZE
for the N32 ABI. Even if it weren't for this "bit rot", I'd still need
to change the code to accomodate the N64 ABI.
Long answer:
Let's look at the condition again...
if (!MIPS_EABI
&& MIPS_SAVED_REGSIZE < 8
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& partial_len < MIPS_SAVED_REGSIZE
&& (typecode == TYPE_CODE_STRUCT ||
...
The part that bothers me in the above is ``MIPS_SAVED_REGSIZE < 8''.
This, in conjunction with !MIPS_EABI, is supposed to specify some
set of ABI's that the shifting operations needs to be performed on
when the other conditions hold.
The problem is that one of my other patches changes MIPS_SAVED_REGSIZE
for N32. We can discuss whether my other patch is correct or not
elsewhere. The point is that we shouldn't be using the value of
MIPS_SAVED_REGSIZE to be an indicator of the ABI which is in use.
In my opinion, it would be better for us to explicitly list the ABI's
affected. That way someone reading the code doesn't need to deduce
the affected ABIs or scratch their heads over whether the prefatory
comment is correct or not. I.e, maybe something like this:
if ( (tdep->mips_abi == MIPS_ABI_O32
|| tdep->mips_abi == MIPS_ABI_N32
|| tdep->mips_abi == MIPS_ABI_N64)
&& TARGET_BYTE_ORDER == BFD_ENDIAN_BIG
&& partial_len < MIPS_SAVED_REGSIZE
&& (typecode == TYPE_CODE_STRUCT ||
...
> As DanielJ mentioned, GCC should be fixed.
I agree with this.
next prev parent reply other threads:[~2002-08-01 22:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-31 15:40 Kevin Buettner
2002-07-31 16:11 ` Michael Snyder
2002-07-31 16:27 ` Kevin Buettner
2002-07-31 16:47 ` Michael Snyder
2002-07-31 18:16 ` Kevin Buettner
2002-07-31 18:33 ` Kevin Buettner
[not found] ` <20020801013959.GA15821@nevyn.them.org>
2002-08-01 16:56 ` Eric Christopher
2002-08-01 17:02 ` Kevin Buettner
2002-08-01 17:08 ` Eric Christopher
2002-08-01 14:55 ` Andrew Cagney
2002-08-01 15:18 ` Kevin Buettner
2002-08-01 15:27 ` Andrew Cagney
2002-08-01 15:47 ` Kevin Buettner [this message]
2002-07-31 16:13 ` Michael Snyder
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=1020801224710.ZM30368@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@ges.redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=msnyder@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