This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sh64 simulator register numbers


Andrew Cagney wrote:
> See the directory gdb/regformats/ and (more importantly) the mail
> archives for information on the changes that are being made to GDB so
> that it will eventually be able to handle remote register numbers.

Hmm. Interesting.  But the documentation seems to be mostly in the 
'looking for volunteers' stage.

Can you give some salient time frames and/or keywords to narrow down the
search space a bit?

Has this been treated both in gdb and gdb-patches?

> Anyway, the below is wrong.  As was pointed out before, the enum values
> should not be hardwired.

Hmm, I didn't realize you want to change the sh64 simulator interface
every time a register is added to the sh4 interface.
Still, as this is linked into a single executable, I suppose this
is managable.
> > !   /* SHmedia */
> > !   SIM_SH64_R0_REGNUM = 128,

So you want this assignment to 128 be dropped, so that SIM_SH64_R0_REGNUM
just gets the next free number?

The rest is all relative to SIM_SH64_R0_REGNUM.
There are 64 general purpose registers, starting with R0.  The stack
pointer is R15. 
> > !   SIM_SH64_SP_REGNUM   = SIM_SH64_R0_REGNUM+15,

After the general purpose registers, we want the program counter.
Is this assignment OK with you?
> > !   SIM_SH64_PC_REGNUM   = SIM_SH64_R0_REGNUM+64,

Or do you want r63 to be assigned a number relative to r0, and then
get automatically the next number for pc?

Or should we enumerate all 64 of the general purpose registers?

Similar considerations apply to the 64 control registers,
8 target registers, how to assign a number to fpscr, and
the 64 floating point registers.
	
-- 
--------------------------
SuperH
2430 Aztec West / Almondsbury / BRISTOL / BS32 4AQ
T:+44 1454 462330


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]