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: [RFA] rs6000-tdep.c: initial support for e500


Kevin Buettner writes:
 > On Aug 20,  4:16pm, Elena Zannoni wrote:
 > 
 > > This patch adds the initial machinery for supporting the Motorola e500
 > > processor.
 > > 
 > > I added registers and pseudo registers in this patch.
 > > I will follow up with abi changes soon.
 > > 
 > > The e500 processor has vector registers which are 64 bit long.  The
 > > lower 32 bits of such registers are the same as the general registers
 > > (hence the pseudos).  No floating point registers in this processor.
 > > 
 > > Elena
 > > 
 > > 2002-08-19  Elena Zannoni  <ezannoni@redhat.com>
 > > 
 > > 	* ppc-tdep.h (struct gdbarch_tdep): Add ev registers.
 > > 
 > > 	* rs6000-tdep.c (rs6000_register_virtual_type): Return 64 bit
 > > 	vector type for ev registers.
 > > 	(e500_pseudo_register_read): New function.
 > > 	(e500_pseudo_register_write): New function.
 > > 	(e500_dwarf2_reg_to_regnum): New function.
 > > 	(PPC_UISA_NOFP_SPRS): New macro.
 > > 	(PPC_EV_REGS): New macro.
 > > 	(PPC_GPRS_PSEUDO_REGS): New macro.
 > > 	(registers_e500): New register set for e500.
 > > 	(variants): Add e500 variant.
 > > 	(rs6000_gdbarch_init): Move setting of pc, sp, fp regnums to
 > > 	before setting architectural dependent variations.  Initialize ev
 > > 	registers numbers.  Add case for e500 architecture.  Set the
 > > 	number of pseudo registers.
 > 
 > Okay.
 > 
 > The fact that the register numbers are so wildly different from any
 > existing PPC port bothers me a bit, but I'll get over it.  (Actually,
 > the fact that they can vary as they did is a pretty good indicator
 > that we've gotten things right elsewhere.  I wonder though if there
 > might not be a few places which still assume that gpr0 is 0 and gpr31
 > is 31.  Hmm... yes, rs6000-nat.c has some code like this.)
 > 

I suspect that that won't be the only place. :-(

 > If I understand things correctly, the pseudo register numbers aren't
 > set in stone, right?  E.g, if there should come a day when we discover
 > that some other register ought to be added, we could add it between the
 > existing "real" registers and the pseudos, right?
 > 

Yes. The only thing is that they have to come at the end after all the
'real' ones. All you would need to change is the tdep initialization
of these registers.

 > Before checking your patch in, take a look at the comments you added and
 > make sure you have two spaces after each period.  Also make sure that
 > comments which contain sentences have periods at the ends.
 > 

Done & committed.

Elena

 > Kevin


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