public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* SH5 compact register numbering in gcc -> gdb interface
@ 2002-04-30 10:53 Joern Rennecke
  2002-04-30 12:30 ` Joern Rennecke
  2002-05-01 17:52 ` Elena Zannoni
  0 siblings, 2 replies; 29+ messages in thread
From: Joern Rennecke @ 2002-04-30 10:53 UTC (permalink / raw)
  To: gcc, gdb, aoliva, ezannoni, bje; +Cc: ac131313

The numbers currently used to encode registers in the debug information
for SH5compact seem quite arbitrary.  I see that they correspond
to the current pseudo register scheme in gdb, but this is going
to change when a unified interface for SH and SH64 is created.
What I have in mind for the simulator interface is to keep the
current SH1-SH4, SH[3]-DSP register numbers, (and also keep the
corresponding gdb pseudo register numbers), and start the SH64
numbers at 128.
The SHcompact simulator register numbers can be the same as for SH4.
However, this exposes the arbitrariness of the gcc->gdb interface,
and I think now - before the integration of the simulator and gdb
port into the FSF sources - is our last chance to change it.

The SHcompact registers are all mapped to SH5media registers,
and therefore it seems most natural to use the numbers used
for these SH5media registers also in SHcompact code - indeed,
this is currently already done for the general purpose registers.
The only odd one out is MACH, which resides in the upper 32 bit
of R17; for this I propose to use number 141.
This numbering also has the advantage that all SH5compact registers
except MACH can be encoded with LEB128 in a single byte.

compact reg current #   sh5 equiv    proposed #
-----------+-----------+------------+------------------
R0  .. R15     0 ..  15 R0   .. R15    0 ..  15
FR0 .. FR15  245 .. 260 FR0  .. FR15  77 ..  92
XD0 .. XD14  289 .. 296 DR16 .. DR30  93 .. 107 (odd only)
PR           241        R18           18
T            242        R19           19
GBR          238        R16           16
MACH         239        R17(high)    141
MACL         240        R17(low)      17
FPUL         244        FR32         109

-- 
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2002-05-10 14:49 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-30 10:53 SH5 compact register numbering in gcc -> gdb interface Joern Rennecke
2002-04-30 12:30 ` 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 22:21     ` Alexandre Oliva
2002-05-07  7:57       ` Joern Rennecke
2002-05-07 10:12         ` Andrew Cagney
2002-05-07 12:03           ` Joern Rennecke
2002-05-07 12:09             ` Elena Zannoni
2002-05-07 15:13             ` Andrew Cagney
2002-05-09 14:53               ` SH5 compact register numbering in gcc -> gdb interface - include/elf/sh.h ? Joern Rennecke
2002-05-09 15:42                 ` Elena Zannoni
2002-05-09 18:22                   ` Andrew Cagney
2002-05-10  7:33                     ` Joern Rennecke
2002-05-10  7:52                       ` Andrew Cagney
2002-05-10  8:38                         ` Joern Rennecke
2002-05-10  4:14                   ` Joern Rennecke
2002-05-10  7:49                     ` Andrew Cagney
2002-05-10  7:53                       ` Joern Rennecke
2002-05-10  4:18                   ` Joern Rennecke
2002-05-07 12:04           ` SH5 compact register numbering in gcc -> gdb interface Joern Rennecke
2002-05-09 22:53             ` Alexandre Oliva
2002-05-08  0:56         ` DWARFx ? .debug sections infos phi 4369
2002-05-08  1:57           ` Lars Brinkhoff
2002-05-08  2:43             ` phi 4369
2002-05-08  7:34               ` Petr Sorfa
2002-05-07 10:19     ` SH5 compact register numbering in gcc -> gdb interface Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).