From: Alexandre Oliva <aoliva@redhat.com>
To: joern.rennecke@st.com
Cc: ezannoni@redhat.com, gcc@gcc.gnu.org, gdb@sources.redhat.com,
bje@redhat.com, ac131313@cygnus.com
Subject: Re: SH5 compact register numbering in gcc -> gdb interface
Date: Fri, 03 May 2002 22:21:00 -0000 [thread overview]
Message-ID: <or4rhotrng.fsf@livre.redhat.lsd.ic.unicamp.br> (raw)
In-Reply-To: <3CD12BF8.7E1650C1@st.com>
On May 2, 2002, Joern Rennecke <joern.rennecke@st.com> wrote:
> Right, so we do need the general purpose register to have different
> numbers, because of their different size. The size shouldn't really
> matter for single integer values inside a register, but it does when you
> need more than one register for SHcompact, or you are describing register
> saves / restores.
The register numbering used by GCC is definitely arbitrary. I hadn't
even considered there might be reasons for it not to be, for which I
apologize. It's a bit unfortunate that this has come up when we're
this close to the first GCC release to include the SH5 port. I'm not
sure we have enough time to come up with a solution, nor whether Mark
would accept it in the branch. It would be too bad if GDB couldn't
debug code compiled by GCC 3.1. Perhaps we can come up with a
backward-compatible register mapping, even if GDB would work in a
degraded mode when the current register numbering is in use.
> I can imagine circumstances where you would want to push GBR or
> FPSCR in the prologue, so it might make sense to have a number for them.
Especially if we move to some more efficient exception handling
mechanism. But there are going to be other interesting problems to
solve to be able to do it. I don't think the current infrastructure
can handle registers saved with different sizes in the stack (think
SHmedia calls SHcompact calls SHmedia, such that we have to restore
say r10 from the SHcompact frame, in which it was saved as a 32-bit
value).
> FPUL is the same size as FR32, so it makes sense to describe it as FR32,
> since that is what it really is.
> PR would only appear as a saved register, but I gather that gdb needs to know
> the size it has been saved in, so it makes sense to have a separate number.
Agreed.
> MACH and MACL are a rather unique problem. When you put a 64 bit value into
> them, you can only describe this properly if you are using big endian.
> This could be fixed e,g, by having a third register, i.e.
> big endian MACH / MACL / little endian MACH.
Sounds like a reasonable solution.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer
next prev parent reply other threads:[~2002-05-04 5:21 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-30 10:48 Joern Rennecke
2002-04-30 12:11 ` Joern Rennecke
2002-05-01 17:55 ` Elena Zannoni
2002-05-02 3:13 ` Joern Rennecke
2002-05-01 17:52 ` Elena Zannoni
2002-05-02 5:06 ` Joern Rennecke
2002-05-03 9:06 ` gdb/sh-tdep.c: need to eliminate target-dependent static variables Joern Rennecke
2002-05-03 22:21 ` Alexandre Oliva [this message]
2002-05-07 7:57 ` SH5 compact register numbering in gcc -> gdb interface Joern Rennecke
2002-05-07 9:41 ` Andrew Cagney
2002-05-07 12:00 ` Joern Rennecke
2002-05-07 12:04 ` Elena Zannoni
2002-05-07 15:13 ` Andrew Cagney
2002-05-09 14:43 ` SH5 compact register numbering in gcc -> gdb interface - include/elf/sh.h ? Joern Rennecke
2002-05-09 15:33 ` Elena Zannoni
2002-05-09 16:50 ` Andrew Cagney
2002-05-10 6:55 ` Joern Rennecke
2002-05-10 7:40 ` Andrew Cagney
2002-05-10 7:49 ` Joern Rennecke
2002-05-10 7:03 ` SH simulator register numbers: include/gdb/sim-sh.h Joern Rennecke
2002-06-11 10:19 ` Unreviewed patch: add include/gdb/sim-sh.h (Was: Re: SH simulator register numbers: include/gdb/sim-sh.h) Joern Rennecke
2002-06-11 14:53 ` Elena Zannoni
2002-05-10 3:09 ` SH5 compact register numbering in gcc -> gdb interface - include/elf/sh.h ? Joern Rennecke
2002-05-10 7:33 ` Andrew Cagney
2002-05-10 7:46 ` Joern Rennecke
2002-05-10 3:25 ` Joern Rennecke
2002-05-07 12:03 ` SH5 compact register numbering in gcc -> gdb interface Joern Rennecke
2002-05-09 21:54 ` Alexandre Oliva
2002-05-08 0:14 ` DWARFx ? .debug sections infos phi 4369
2002-05-08 1:36 ` Lars Brinkhoff
2002-05-08 1:53 ` phi 4369
2002-05-08 6:35 ` Petr Sorfa
2002-05-07 10:13 ` SH5 compact register numbering in gcc -> gdb interface 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=or4rhotrng.fsf@livre.redhat.lsd.ic.unicamp.br \
--to=aoliva@redhat.com \
--cc=ac131313@cygnus.com \
--cc=bje@redhat.com \
--cc=ezannoni@redhat.com \
--cc=gcc@gcc.gnu.org \
--cc=gdb@sources.redhat.com \
--cc=joern.rennecke@st.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