From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@cygnus.com>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Add support for fpscr for Power / PowerPC targets
Date: Thu, 11 Apr 2002 13:39:00 -0000 [thread overview]
Message-ID: <1020411203947.ZM3483@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@cygnus.com> "Re: [PATCH] Add support for fpscr for Power / PowerPC targets" (Apr 11, 4:08pm)
On Apr 11, 4:08pm, Andrew Cagney wrote:
> > tdep->ppc_xer_regnum = 69;
> > if (v->mach == bfd_mach_ppc_601)
> > tdep->ppc_mq_regnum = 124;
> > - else
> > + else if (power)
> > tdep->ppc_mq_regnum = 70;
> > + else
> > + tdep->ppc_mq_regnum = -1;
> > + tdep->ppc_fpscr_regnum = power ? 71 : 70;
> >
> > For PowerPC, the fpscr regnum is 70, which was an unused slot. For
> > Power, I chose to use the first available slot (71). The other change
> > that this patch makes is to make MQ unavailable for all PowerPC
> > targets except for the 601 processors (which is as it should be).
>
> Kevin, is there any reason to not just use the same slot for both POWER
> and PowerPC?
It would be nice if we could, but I don't see how it can be done without
either
1) renumbering some registers for some processors.
or
2) assigning fpscr to a really high slot that's larger than any
current register.
I didn't want to do (1) because existing stubs would likely break.
(But see below).
I didn't want to do (2) because that would introduce a really large
gap between fpscr and the rest of the registers for most processors.
Slot 70 was an unused slot for PowerPC, but it was used for ``mq'' for
Power. The next available slot for Power was 71, so that's what I used
for Power.
Also, for PowerPC, slot 70 was already in the set of PPC_UISA_SPRS and
that's exactly where fpscr belongs.
If we don't mind a minor violation of (1), I could reassign mq to slot 71
for Power. That would free up slot 70 so that Power would also have
fpscr available at the same slot number as PowerPC. This might be a
relatively safe thing to do since it's likely that there aren't many
(any?) existing stubs for the Power architecture. It'll require some
adjustments to rs6000-nat.c, but I'm willing to make those adjustments.
Opinions?
Kevin
next prev parent reply other threads:[~2002-04-11 20:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-11 12:17 Kevin Buettner
2002-04-11 12:25 ` Daniel Jacobowitz
2002-04-11 13:10 ` Kevin Buettner
2002-04-11 13:31 ` Daniel Jacobowitz
2002-04-11 13:08 ` Andrew Cagney
2002-04-11 13:39 ` Kevin Buettner [this message]
2002-04-14 14:52 ` 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=1020411203947.ZM3483@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@cygnus.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