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: [Fwd: Re: Enum constants for sh1-sh4, sh{3}-dsp register numbersin thesimulator]


> 
> Do you mean to add  SIM_SH_FR1_REGNUM .. SIM_SH_FR15_REGNUM and the various
> individual banked regnums?  I could do that.
> 
> OTOH, if you mean to remove the seed values like 24 for SIM_SH_DSR_REGNUM and
> 40 for SIM_SH_MOD_REGNUM, making a flat enum, that would break backwards
> compatibility,
> as we have some gaps, and overlaps between floating point and dsp registers.
> (This mirrors an overlap in the instruction set.  In fact the instructions to
> manipulate
>  FPSCR and DSR are the same, and the simulator makes use of this by treating
> them really
>  as the same.)

I mean flatten it.

If FPSCR and DSR are the same physical register on the SIM then have 
just one of them in the enum.  Separate to that define constants that 
map onto that main enum.

So:

	enum sh_...
	{
	};

	enum
	{
	  DUP_REG = SH_SIM_..._REG,
	};

enjoy,
Andrew



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