[Fwd: Re: Enum constants for sh1-sh4, sh{3}-dsp register numbers in thesimulator]

Andrew Cagney ac131313@cygnus.com
Thu May 23 09:07:00 GMT 2002


> 
> 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




More information about the Gdb-patches mailing list